34,333
edits
Changes
→What are Cascading Style Sheets for?
In the early days of the world wide web all we had to create content on web pages was HTML. HTML does some things very well, but does not provide a great deal of control over style of web page content. Furthermore, what control it does give us has to be embedded into the content. Essentially this meant that style was not separated from content. If we wanted to change the overall look and feel of a web iste we had to edit each individual web page and chaneg the style settings.
Cascading Style Sheets allows us to specify the style of the content in a separate file which can be changed such that modifications are reflected in all pages that include that style sheet. Withthe introduction of CSS it is now possible to define the document structure and content in HTML, while controling the style and appearance using CSS. == Embedding CSS Styles into a Web Page == CSS style can be embedded in an HTML document using the <style> tag as follows: <pre> <style type="text/css"> H1 {color: red;}</style> </pre> The above style settings as the effect of making all <H1> headers in the web page appear in red. == Importing an External Style Sheet into a Web Page == Whilst it is possible to include all your CSS styles by embedding them into each HTML page this, to a certain degree, defeats one of the main objectives of CSS. It is much better to place the styles in a separate CSS file and import that file into each