Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects | Member Perks | Member Login |
HTML Help: Validation Errors
Why does the W3C validator give me errors for closing a paragraph? It says one wasn't opened, but there dang sure was! The page is at [address intentionally removed].
The validator assumes a paragraph is closed when it encounters another block level element. In your case, you have opened a heading tag before closing the paragraph tag. When the heading tag was opened, the paragraph was "presumed" closed even though no closing tag was yet coded, so when you did close the paragraph later, after the heading tag, the validator doesn't recognize it as still open.
It appears you coded it that way to preserve the CSS formatting of the text that you placed inline with the paragraph. While it's legal to do this, if you want to include other block level elements within multiple separate paragraphs you should use CSS in a division tag instead, then put the paragraphs, headings, and any other block level elements within the division. That way the formatting will be preserved after you properly close your paragraph tags before opening a heading tag. Using division tags for CSS formatting will avoid the problems you've been having with validation. Note: A block level element is any HTML element that causes a line break such as a heading or table. Elements that do not cause a line break, such as images or spans, are inline elements. In other words, elements that do not force a line break.
This concludes the
HTML Help about Validation Errors. Based on your interest in this tutorials you may also be interested in: HTML Division Tag Tutorial. |
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!
Check out SEO for YOU now! Almost a NewsletterSubscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:Did you know...The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ] |
Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects
Sitemap | Member Perks | Member Login | About BoogieJack.com | Contact | Privacy Policy | Copyright Policy | Links
|