SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
-
Oct 28, 2006, 18:23 #1
- Join Date
- Apr 2004
- Location
- Belgian in Mexico
- Posts
- 307
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
validation issue (HTML 4.01 Strict)
I want to validate a webpage I've just created, and the only reason it won't validate is this:
Error Line 5 column 76: character data is not allowed here.
...ype" content="text/html; charset=utf-8" />
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).
Hope someone can help me.
MichaëlMichaël Niessen
http://assemblysys.com
(Countries/states/cities with latitude & longitude,
weathercodes & topical databases)
-
Oct 28, 2006, 19:14 #2
If you want us to troubleshoot your code please post the full, complete page code and/or a link - It can only be guessed at from what you have provided.
-
Oct 28, 2006, 19:19 #3
" />" = XHTML not HTML
" >" = HTML not XHTML
-
Oct 28, 2006, 19:25 #4
- Join Date
- Apr 2004
- Location
- Belgian in Mexico
- Posts
- 307
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Nevermind, I found the mistake. I had to remove the / at the closing of each meta tag. It now validates.
MichaëlMichaël Niessen
http://assemblysys.com
(Countries/states/cities with latitude & longitude,
weathercodes & topical databases)
-
Oct 28, 2006, 19:26 #5
- Join Date
- Apr 2004
- Location
- Belgian in Mexico
- Posts
- 307
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank, logic_earth. I hadn't seen your post yet when I posted my previous message.
Michaël Niessen
http://assemblysys.com
(Countries/states/cities with latitude & longitude,
weathercodes & topical databases)
-
Oct 28, 2006, 19:48 #6
Originally Posted by mniessen
Glad you fixed it.
-
Oct 28, 2006, 21:13 #7
- Join Date
- Apr 2004
- Location
- Belgian in Mexico
- Posts
- 307
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by John Wozniak
MichaëlMichaël Niessen
http://assemblysys.com
(Countries/states/cities with latitude & longitude,
weathercodes & topical databases)
-
Oct 28, 2006, 23:50 #8
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
When you use <tag/> in HTML, it is equal to <tag>&gt;, i.e., the tag, followed by a greater-than sign.
If you use <br/> somewhere in BODY, it's perfectly valid. It's a break tag followed by a greater-than sign (although all browsers parse it incorrectly).
In the HEAD, however, <meta.../> will be invalid, because you're not allowed to sprinkle greater-than signs inside HEAD. The HEAD element can only contain a few element types; not text.Birnam wood is come to Dunsinane
-
Oct 30, 2006, 04:51 #9
- Join Date
- Dec 2004
- Location
- Derbyshire - UK
- Posts
- 2,651
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
In that case would
<br /
pass HTML validation? Obviously if the browsers parse this incorrectly then there would obviously be little point in doing this but the question helps to serve my curiosity
-
Oct 30, 2006, 13:59 #10
- Join Date
- Dec 2004
- Location
- Sweden
- Posts
- 2,670
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by csswiz
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" -- this is a >cool< comment -- [ <!-- another comment --> ]> <title/my funky title/ <p<button button/button/ <>This is actually a paragraph.</>
Simon Pieters
-
Oct 30, 2006, 14:22 #11
Originally Posted by zcorpan
- that is pretty funny.
-
Oct 31, 2006, 00:16 #12
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Good luck finding a browser that supports that sort of minimisation, though.
Birnam wood is come to Dunsinane
Bookmarks