Forum Moderators: open
I would like some help with headers tags on my first page please.
Now, I have two h2 tags and I believe that is wrong, but I am trrying to get people's attention so I would like to make the text stand out.
Maybe if the second h2 tag was a bit smaller, it would be fine too.
Please advise.
Thanks
-a-
If you think about an outline with indents, you'll be on the right track.
H1 - Main topic (headine, subject, whatever you call it)
H2 - All the "sub-topics" that are indented once
H3 - Doubly indented sub-sub-topics
...etc
You can use css to style the appearance of any H tag any way that works for your pages. It's important not to think of the H tag in visual terms - it has only semantic implications. You can even create several classes for size, color etc and apply a difference class to a different H tag if that's what you need visually. Just keep the semantic relationshiops straight.
On the results page, scroll down past the error list (if there is one) to the section marked "Document Outline". If the list there does not look like a summary of your document then you are abusing the heading tags.
This is what I got:
This page is not Valid XHTML 1.0 Transitional!
1.
Line 55, column 3: document type does not allow element "h3" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<h3>Love Poetry, Birthday Poems, Anniversary Poems, Wedding Poems Created Just F
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
2.
Line 56, column 2: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<p>
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
)
3.
Line 57, column 3: document type does not allow element "h4" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<h4>Give a gift that will never be forgotten. Purchase a Personalized Poem from
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
)
[edited by: tedster at 12:28 am (utc) on July 31, 2004]
[edit reason] Too Much Information [/edit]
The errors I left are similar to each other, as were many other errors in your output. You seem to have an improper container element for those H tags and <p> tags - or you may have forgotten a closing tag earlier on the page. This XHTML, so you can't leave out any closing tags.
Take a look at your source code and see if those elements are contained by an inline element, or if you left an inline eemet open earlier on the page.
You may want to refer to:
Visual Formatting Model - W3C [w3.org]
Global Structure of an HTML Document [w3.org] (See 7.5.3 for block/inline elements)
The errors, on the other hand, should be corrected.
Do this:
1) Count the lines in the source code(view source from browser, not actual server file) until you get to the first error. Copy and paste that line and include about three lines before and after it.
2) Post it here
Once you see what is wrong in the first error, you should be able to fix the rest yourself.
Birdman
Thank you and here are the lines:
The first error starts with the <h3> Love poetry, birthday poems, anniversary poems>
Thank you so much
Amy
td id="bgtd"><table width="98%" border="0" cellspacing="4" cellpadding="10">
<tr>
<td class="main" width="60%" align="left" valign="top">
<h2>Love Poems? We Do!</h2>
<p>
<h3>Love Poetry, Birthday Poems, Anniversary Poems, Wedding Poems Created Just For You.</h3>
<p>
<h4>Give a gift that will never be forgotten. Purchase a Personalized Poem from Poems To Go!</h4>
<p>Welcome to Poems To Go, a unique poetry service, where we create customized <a href="birthday4.html">friendship birthday poems</a>, <a href="weddings2.html">wedding toasts</a>, <a href="weddingvows.html">wedding vows</a>,
<a href="weddings3.html">wedding shower poems</a>, <a href="birthday1.html">birthday poems</a>,
<a href="anniversary.html">anniversary poems</a>, and poetry for <a href="specialoccasiontwo.html">all special occasions.</a></p>
<p>As the <a href="toasttocouple.html">Best Man</a>, or <a href="maidofhonor.html">Maid of Honor</a>, are you searching for just the right words to say to the bride and groom?
Finding the perfect words is not always the easiest of jobs.</p>
Not only is your <p> tag not closed, but it has no content - it's a "null" paragraph. I would guess that the <p> is only there to add some extra spacing -- but that's not what a paragraph is really about.
The extra spacing, if needed, should be added with a CSS style that adds the desired margin-top or padding-top to the <h3> element itself.
Thank you again,
Amy
Line 70, column 6: document type does not allow element "h3" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<h3>Ordering Your Personalized Poem is Quick and Easy</h3>
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
)
Here is line 70
<p>Ordering a personalized poem is quick and easy. All you have to do is:</p>
Here is the error;
Line 70, column 6: document type does not allow element "h3" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<h3>Ordering Your Personalized Poem is Quick and Easy</h3>
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
)
and here is my line:
<h3>Ordering Your Personalized Poem is Quick and Easy</h3>
<p>Ordering a personalized poem is quick and easy. All you have to do is:</p>
thanks and now good night
amy
I'd again suggest you look for an unclosed tag, as the hint says at the end of your error report.
Good morning, I found the error and fixed that one, thank you.
Now, I have another error here:
Line 62, column 8: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<p>As the <a href="toasttocouple.html">Best Man</a>, or <a href="maidofhon
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
)
Here is my line:
<p>As the <a href="toasttocouple.html">Best Man</a>, or <a href="maidofhonor.html">Maid of Honor</a>, are you searching for just the right words to say to the bride and groom?
Finding the perfect words is not always the easiest of jobs.<br /><br />
I had hoped that my adin the <br /><br />, the line would be fixed, but I still receive the error.
Amy
Once again, the validator is telling you that the 'document type does not allow element "p" here'. 'Here' means the context in which it finds the line.
There's nothing wrong with your line, so, once again, the error must be in a line above the one in question. Have a look on the three or four lines above line 62 for tags that are not closed. If you can't see a problem, post the relevant lines here again.
Incidentally, I'd get rid of the <br />s. There's nothing wrong with them, but you'd be better off using CSS to format your page. Don't worry about that at the moment. We'll get to it once we've got your HTML validated.
I can't seem to find the problem. Here are the three lines directly above the line in question.
<p>Welcome to Poems To Go, a unique poetry service, where we create customized <a href="birthday4.html">friendship birthday poems</a>, <a href="weddings2.html">wedding toasts</a>, <a href="weddingvows.html">wedding vows</a>,
<a href="weddings3.html">wedding shower poems</a>, <a href="birthday1.html">birthday poems</a>,
<a href="anniversary.html">anniversary poems</a>, and poetry for <a href="specialoccasiontwo.html">all special occasions.</a>
Thank you
Amy
In HTML (no X) certain tags, including <p> have an optional end tag. If you don't close it explicitly and new one comes along, it is just "assumed" to be closed. But that looseness does not exist in XHTML.
Now, I have this error:
Line 70, column 6: document type does not allow element "h3" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<h3>Ordering Your Personalized Poem is Quick and Easy</h3>
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
)