IntroductionCascading Style Sheets (CSS) are a collection of formatting rules that control the appearance of content in a web page. They are very useful for maintaining a web site since its appearance (controlled by properties of HTML tags) can be managed from just one file. CSS Styles also enhance your site's look, accessibility and reduces file size. Another main advantage is reusability - instead of defining the properties of fonts, backgrounds, borders, bullets, uniform tags, etc. each time you use them you can just assign the corresponding css style in the class property. You can store CSS styles directly in each document or, for more control and flexibility, in an external style sheet.
There are 3 types of CSS Styles:
Custom CSS (Class) styles: create a customized style with the set attributes. These class styles can be applied to any tag.
HTML Tag styles: redefine the formatting for a particular tag, such as . All text formatted with the h1 tag is immediately updated.
There are 3 types of CSS Styles:
Custom CSS (Class) styles: create a customized style with the set attributes. These class styles can be applied to any tag.
HTML Tag styles: redefine the formatting for a particular tag, such as . All text formatted with the h1 tag is immediately updated.
Advanced CSS Selector styles: redefine the formatting for:
1.A particular combination of tags (for example, td h2 applies whenever an h2 header appears inside a table cell) and pseudo-class styles (for example, a:link, a:hover, a:visited)
2.A specific ID attribute (for example, #myStyle applies to all tags that contain the attribute-value pair id="myStyle")
Comments