HTML Style Sheets

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

If the user has a task of creating ten headings all of which should be centred, the user has to type the code <FONT ALIGN=CENTER> and </FONT> ten times. If the user has to change the alignment, then he has to retype the alignment attribute ten times. But, with style sheets the user would have to add just a few lines of code and change the alignment with only one word.

Style sheets are typographical specifications for controlling the appearance of HTML elements in a document. Style information can be defined within a document, or defined in an external file and attached to an HTML document.

The heading tags <H1 > to <H6> are the best examples for style sheets. The tag <H1 > is for bold, times new roman, 24 point fonts. The users can also create their own style sheets that can be used in the HTML document.

Cascading style sheet is a type of style sheet which uses multiple, overlapping style definitions in a single document.

<html>
<head>
<style>
h1={text-align:center; font-family:arial; color:blue}
h2={text-align:center; font-family:arial; color:red}
h3={text-align:center; font-family:arial; color:orange}
</style>
</head>
<body>
<h1>Text in blue color</h1>
<h2>Text in red color</h1>
<h3>Text in orange color</h1>
</body>
</html>



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.