Attaching a CSS to an HTML page by Matt Ottewill

Linking and importing

There are 2 ways to link a stylesheet to an html page ...

Link
Import

Link

This will link the style sheet to the page but ... pre version 5 browsers which do not recognise CSS properly will have problems displaying the html coherently. The HTML code will appear in the <head> tag and look like this ...

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

Import

This will link the style sheet but hide it from any non css compatible (pre version 5) browsers which will simply ignore it. Your end-user will then see simple but logically formatted html. The HTML code will appear in the <head> tag and look like this ...

<style type ="text/css">
@import url(styles.css)
</styles>

How to attach a CSS in Dreamweaver

Open each HTML page you want to attach the CSS file to and use the Attach Style Sheet button at the bottom of the CSS palette to attach the CSS file to each page. You have 2 options ...

Related downloads

None at present

Music by our artists

Free MP3 tracks

Download page

Related ads