"Hello World"
Welcome To
narestechweb.blogspot.com
What is Css ?
- CSS stands for Cascading Style Sheets
- CSS describes how HTML elements are to be displayed on screen,
paper, or in other media
- CSS saves a lot of work. It can control the layout of
multiple web pages all at once
- External stylesheets are stored in CSS files
Why use CSS?
CSS is used to define styles for your web pages, including the design, layout
and variations in display for different devices and screen sizes.
CSS Example
body
{
background-color: lightblue;
}
h1
{
color: white;
text-align: center;
}
p
{
font-family: verdana;
font-size: 20px;
}
All CSS Simple Selecors :
Selector | Example | Example description |
---|
#id | #firstname | Selects the element with id="firstname" |
.class | .intro | Selects all elements with class="intro" |
element.class | p.intro | Selects only <p> elements with class="intro" |
* | * | Selects all elements |
element | p | Selects all <p> elements |
element,element,.. | div, p | Selects all <div> elements and all <p> elements | | | | |
Three Ways to Insert CSS :
There are three ways of inserting a style sheet:
- External CSS
- Internal CSS
- Inline CSS
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body> </html> |
---|
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body> </html> |
---|
CSS Top IDE'SDownload for Mac-linux-windows: Support Me:Follow Me : Instagram
Follow Me:Facebook Follow Me :Twitter Follow Me :Blog
***********************************************************************************
Thank You for Reading...🙏 |
---|
Comments
Post a Comment