What are Stylesheets and STYLE?Stylesheets are used to apply formating to the webpage. HTML is limited by the attributes and values associated with HTML. Style (aka Stylesheets) allow the programmer to take total creative control of the webpage by customizing the way the HTML tags behave. Style can be applied in three ways. First, it can be applied at the point it is needed:
The specific style is followed by a colon [ : ], then the specific value follows. Each value ends with a semicolon [ ; ]. Follwing the semicolon, you can add other style elements:
Second, you can define ALL uses of a particular tag on the webpage, by placing your style in the HEAD of your document:
You can format as many tags as you like in the head of the document, so long as each tag (now called a selector, is followed by the { } brackets, which enclose the Declaration. Each definition contains one or more statements, each statement ending with a semicolon [ ; ] Finally, Third, you can also move all your style definitions from the HEAD of your document to a seperate document altogether. The new document need only contain the <STYLE> </STYLE> tags, with all the definitions nested in between (just as in the head of your document). You must place a CALL to that style document within the HEAD of the page where the style is to be applied:
When all your style is store in a seperate document (MyStylesheet.css, for example), you can then makde changes to various tags in the stylesheet, and save it with a new name. Then to apply these new styles, you simply change the filename in the LINK tag above.
You can set up as many stylesheets as you want, and apply them whenever you get the whim to give your webpage a new look. For more information about stylesheets, style elements, and examples, check out the following websites:
|