PDA

View Full Version : DW not recognising H1 in the stylesheet


Ben B
01-03-2008, 02:14 PM
I've recently redesigned our company website, trying to do a few more things right in the eyes of the search engines.
One of the things I'm doing is making sure I properly tag headings as H1, but despite creating the style for 'H1' in the stylesheet, dreamweaver (CS3) doesn't give it to me as an option in the dropdown.

However, if I name it .H1 dreamweaver does let me use it (it's the same with any other styles I want to create, they have to have a . in front of them to be recognised). (Dreamweaver displays it in the dropdown without the . though.)

All was well I thought, with the . in there, but after checking my site on websitegrader.com it told me no heading tags were found. I'm assuming because they are called .h1 and webcrawlers are only looking for h1?

Is there any way of DW CS3 letting me use the style h1? Or am I doing something obvious and wrong? Even the help file tells me to call it h1, but it won't work if I do! Thanks

domedia
01-03-2008, 03:03 PM
.h1 and h1 are completely different :)

h1 is the header tag and .h1 is a CSS class named 'h1'. You can call these classes whatever you want. I would suggest not naming CSS classes after HTML elements, this could be confusing.

Ben B
01-03-2008, 03:08 PM
Thanks Domedia,

So where would I specify what h1 looks like, if not in the CSS? In the header of each page individually? I thought that was what css was supposed to get round?

d a v e
01-03-2008, 03:43 PM
specify h1 in your style sheet

h1 {color:blue;}

and then make your headings in your html as usual

e.h.

<h1>heading goes here</h1>

Ben B
01-03-2008, 03:51 PM
I think I see what I'm doing wrong now!!! I'm looking for H1 in the 'style' section, when I havent even checked the 'format' dropdown, that blatantly lists Heading1, Heading 2 etc - 6 !!

I should have known it was something simple!!

so anything that the stylesheet refers to as h1 will be heading1?

domedia
01-03-2008, 04:41 PM
Click on the new CSS Rule image (document with a plus sign)
Then choose 'Tag', and in the dropdown choose H1

edit: ah you got it already, excellent :)

h1 in your stylesheet will style all <h1> tags