What is CSS?
Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a HTML Its most common application is to style web pages. which standardises the Presentation throughout a website, including elements like layout, colour and font.
The key advantages of CSS?
One of its key benefits is the way it allows the separation of document content written in HTML from document presentation written in CSS. You can automatically change every page of your website. The bigger your website, the more time CSS saves you. And not only does CSS save time, it also ensures that your web pages have consistent styling throughout your site. The recent arrival of other Internet browsers is further evidence that today's Internet users have more browser options than ever before, which makes browser compatibility a major issue for your website. CSS style sheets increase your website's adaptability and ensures that more visitors will be able to view your
website in the way you intended. Probably the mostly useful feature of CSS is that all of the style and
layout is removed from the html, so the html page size is very much smaller. The CSS file is downloaded just once by the visitor's browser and re-used for different pages on a web site.
website in the way you intended. Probably the mostly useful feature of CSS is that all of the style and
layout is removed from the html, so the html page size is very much smaller. The CSS file is downloaded just once by the visitor's browser and re-used for different pages on a web site.
Three different ways of implementing styles within an HTML
page.
linked external file |
An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. You link to the external style sheet from all your HTML pages. This means you only need to set the styles for each element once. and if you need to change the style you only need to change it in one place.
|
In-line |
An in-line style loses many of the advantages of style sheets by mixing content with presentation. In-line styles have the highest precedence. This means they are going to be applied no matter what. In-line
styles are easy and quick to add. You don't need to create a whole new document (as with external style sheets) or edit a new element in the head of your document (as with embedded style sheets). |