Linking your HTML page with a stylesheet is really simply on Dreamweaver. Simply open your HTML page and on the sidebar, you will see a CSS dropdown tab. Under the ‘Properties’ section, there’s an ‘attach stylesheet’ button that will allow you to browse for your .css file and link it up with the HTML page.
What’s even easier, is to do this without Dreamweaver. You’ve got your HTML page ready, and your CSS file ready…all you have to do is to paste the following code:
<link href="style.css" rel="stylesheet" type="text/css" />
above the </head> tag of your header.
If you’re on Dreamweaver anyway, creating a new and blank HTML page already adds the basic HTML codes in for you:
<!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" /> <title>Untitled Document</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> </body> </html>
So the only thing left is that line of code that links to your stylesheet.
Remember that “style.css” is the location of your .css file, from your index.html. So if they are not located in the same folder then you will have to change the location. For example, if your ‘style.css’ file is in a css folder, then it should be: “css/style.css”


