Difference between revisions of "Understanding Cascading Style Sheets (CSS)"
Line 1: | Line 1: | ||
− | To fully understand the power of JavaScript it is first necessary to understand Cascading Style | + | To fully understand the power of JavaScript it is first necessary to understand Cascading Style Sheets (CSS). If you are already familiar with CSS then you can safely skip this chapter and move on to the next chapter ([[JavaScript and CSS]]). |
− | Whole books have been dedicated to learning CSS and there is far more to CSS than can be covered in this chapter. The purpose of this chapter, therefore, is to provide a basic understanding of CSS and convey enough information to enable you to work with CSS and | + | Whole books have been dedicated to learning CSS and there is far more to CSS than can be covered in this chapter. The purpose of this chapter, therefore, is to provide a basic understanding of CSS and convey enough information to enable you to work with CSS and JavaScript to create dynamic styles and layouts in your web pages. |
== What are Cascading Style Sheets for? == | == 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 refelcted in all pages that include that style sheet. |
Revision as of 16:53, 17 May 2007
To fully understand the power of JavaScript it is first necessary to understand Cascading Style Sheets (CSS). If you are already familiar with CSS then you can safely skip this chapter and move on to the next chapter (JavaScript and CSS).
Whole books have been dedicated to learning CSS and there is far more to CSS than can be covered in this chapter. The purpose of this chapter, therefore, is to provide a basic understanding of CSS and convey enough information to enable you to work with CSS and JavaScript to create dynamic styles and layouts in your web pages.
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 refelcted in all pages that include that style sheet.