Website coding tutorial: Adding a stylesheet to a html page!

Damien

Seasoned Veteran
Joined
Apr 29, 2007
Messages
3,232
Reaction score
0
FP$
6
Most people today, use a CSS stylesheet, you may or may not know much about stylesheets, we use them, they have all the information so to speak on the frame work of the website, I will teach you more about how to code in css soon.

First make a a new document called stylesheet.css

Then go to your html page and in the <head> section add this

Code:
<link rel="stylesheet" type="text/css" href="css.css" />

This should be all you have to do, your html page should now read off the style sheet.



After I have attached a stylesheet here is what my html document looks like...

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css.css" />
<title>Untitled Document</title>
</head>

<body>


</body>
</html>

Thanks for reading this tutorial, more how to code html and css soon!
 
Back
Top Bottom