style sheets (CSS) to web pages is a relatively simple process, although the topic as a whole is fairly sizeable. Technically speaking, style sheets are not part of HTML but act as an extension to it. Consequently there is a whole new syntax to learn, as well as the HTML used to implement style sheets. In addition to this, browsers have only recently started supporting style sheets and there are differences in the extent and manner of implementation.
How to format an HTML document with style information added to the <head> section.
<html>
<head>
<style type=”text/css”>
h1 {color: red}
h3 {color: blue}
</style>
</head>
<body>
<h1>This is Text 1</h1>
<h3>This is Text 3</h3>
</body>
</html>
This is Text 1This is Text 3 |
How to make a link that is not underlined, using a style attribute.
<html>
<body>
<a href=”home.htm”
style=”text-decoration:none”>
Home Page Link!
</a>
</body>
</html>
How to use styles
a browser reads a style sheet, it will format the document according to it.
<head>
<link rel=”stylesheet” type=”text/css”
href=”style.css”>
</head>
