it’s make your web pages more attractive and allows you to create rules that specify how the content of an element should appear
and to link CSS with Html we can do it in three ways:
1-Inline - by using the style attribute in HTML elements 2-Internal - by using a
command used in an HTML document to tell the browser where to find the CSS file used to style the page.
This attribute specifies the type of document being linked to. The value should be text/css. rel This specifies the relationship between the HTML page and the file it is linked to
……………….. CSS works by associating rules with HTML elements: the CSS rule contains two parts: 1- selector : indicate which element the rule applies to
Targets all elements on the page. ………………..
………………..
ID Selector:#introduction {} Targets the element whose id attribute has a value of introduction ………………..
Targets any elements that are children of an <li> element ( but not other elements in the page) ………………..
Targets any elements that sit inside a <p> element, even if there are other elements nested between them ………………..
If you had two <p> elements that are siblings of an <h1> element, this rule would apply to both
2- declaration indicate how the elements referred to in the selector should be styled.
1- property 2- avalue You can specify several properties in one declaration each separated by a semi-colon
nav ,h1 {color:red;}
Properties indicate the aspects of the element you want to change. For example, color, font, width, height and border.
h1 to outlines to each of the elements its indicate to “importantance” the difference between block level and inline elements and how how browsers display them Block level elements look like they start on a new line.
but the Inline elements flow within the text and do not start on a new line.
control the text -Typeface -Size -Color -Italics, bold, uppercase, -lowercase, small-caps
There are also specific ways in which you can style certain elements such as lists, tables, and forms.
When building a site with more than one page, you should use an external CSS style sheet This:
Allows all pages to use the same style rules (rather than repeating them in each page).
Keeps the content separate from how the page looks.
Means you can change the styles used across all pages by altering just one file (rather than each individual page).