Forum Moderators: open

Message Too Old, No Replies

Do I need to close h1 tag?

         

raja4

4:43 pm on Apr 26, 2004 (gmt 0)

10+ Year Member



<tr><td colspan="2"><h1>Product name</td></tr>
<tr><td colspan="2" class="body"><br><p><img src="images/productbottle2.gif" >Product name is an original product......bla bla</td></tr>

Do I really need to close h1 tag? I don't like extra carroage return it enters. If I don't have closing h1 tag, do search engines think my whole site is in h1 tag though I use CSS to control body text.

Am I safe if I don't use closing h1 tags?

drbrain

4:44 pm on Apr 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You must close it.

Use CSS to remove the margins you despise:

h1, h2, h3, h4, h5, h6 { margin: 0 }

jusdrum

5:15 pm on Apr 26, 2004 (gmt 0)

10+ Year Member



drbrain is right.

john_k

5:20 pm on Apr 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or better yet - If you don't want a carriage return, then the text you are marking isn't a heading. So use CSS to define a different style and use that.

raja4

5:53 pm on Apr 26, 2004 (gmt 0)

10+ Year Member



Thanks guys. Awesome help.

MatthewHSE

10:37 pm on Apr 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or better yet - If you don't want a carriage return, then the text you are marking isn't a heading.

Not always true. Many headings look better right above the text they're intended for. The question isn't whether or not the carriage return is present or desirable, but whether or not the heading is distinct from, and more emphasized than, the rest of the text on the page.

willybfriendly

10:44 pm on Apr 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Some Headings might even appear in-line. A heading is meant to demarcate a section of copy.

It is only convention that makes some believe that a heading must sit on its own little line.

Limited Screen Real estate may cause changes in this convention. One can only fit so much on a monitor, so it is natural for the style of headings to evolve into something that conserves this valuable resource.

WBF

tedster

2:47 am on Apr 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In print, there is something called a "run-on head" where the heading is inline with the paragraph -- sometimes just the opening 5 or 6 words of a full sentence. With CSS you can still achieve this using H tags. And when browser support for negative margin-left is a bit better, HANGING run-on heads may become common.

I'd say that this discussion is headed in the right direction. It's a semantic issue whether a group of words constitutes a heading or not, and not a rendering style issue.

ronin

11:13 am on Apr 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



In print, there is something called a "run-on head" where the heading is inline with the paragraph

Yes, indeed. I have a page layout where a number of outlined sections on the page have exactly this setup.

I use something like:

h2 {display:inline; margin-right:2em;}

The paragraph runs straight on from the heading.