homepage Welcome to WebmasterWorld Guest from 184.73.104.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Question about code being shown as error when validating
tag error when validating
brettxw



 
Msg#: 4291401 posted 6:13 am on Apr 3, 2011 (gmt 0)

I went and validated my code and most of the errors I get are similar to this one :

Line 4, character 69:

... ="text/html; charset=UTF-8" />
^

Error: element meta not allowed here; check which elements this element may be contained within


The full code is this :

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

How do I go about resolving this /> error that is being produced?

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 7:23 am on Apr 3, 2011 (gmt 0)

Which DOCTYPE are you using?

The error might actually be on a preceding line.

brettxw



 
Msg#: 4291401 posted 8:56 pm on Apr 3, 2011 (gmt 0)

Sorry for the delay in responding

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 9:01 pm on Apr 3, 2011 (gmt 0)

You probably forgot the closing tag on a previous element.

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 9:15 pm on Apr 3, 2011 (gmt 0)

...or a closing quote, maybe. That's way up in the <head> section of your source code. It should not be too hard to look through those previous three lines to find what kind of burble slipped through.

brettxw



 
Msg#: 4291401 posted 9:18 pm on Apr 3, 2011 (gmt 0)

Those are the first three lines...

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 9:19 pm on Apr 3, 2011 (gmt 0)

If what you posted is the first four lines, then you never opened the <html> or <head> elements

brettxw



 
Msg#: 4291401 posted 9:30 pm on Apr 3, 2011 (gmt 0)

AH Im so stupid! Ugh! Can we pretend this was never asked? hahaha. wow. Thank you Tedster.

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 9:42 pm on Apr 3, 2011 (gmt 0)

I had assumed you had simply redacted the intervening lines, posting just the DOCTYPE and the line flagged as having an error.

This is, however, the point in the dialogue where I ask "Do you really need XHTML here?".

brettxw



 
Msg#: 4291401 posted 9:48 pm on Apr 3, 2011 (gmt 0)

Isnt XHTML the current standard?

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 10:49 pm on Apr 3, 2011 (gmt 0)

XHTML is an evolutionary dead-end that should never have happened.

I use HTML 4.01 Transitional or HTML 4.01 Strict for everything, and HTML 5 is coming along in bumps and starts.

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 12:00 am on Apr 4, 2011 (gmt 0)

Can we pretend this was never asked?

It's the kind of "dead obvious" mistake that we all make sometimes - so no worries at all. It will probably help more than one person in the future

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 12:08 am on Apr 4, 2011 (gmt 0)

Did I tell you about the time I kept getting 404 Not Found for a new script file? Spent ages in server configuration, PHP diagnostics and whatnot before eventually noticing the file was called index.hph and was in the wrong folder. Having noticed one problem and fixed it, it was more than an hour before I noticed the other problem though.

brettxw



 
Msg#: 4291401 posted 12:37 am on Apr 4, 2011 (gmt 0)

Really? index.hph? I guess everyone at all levels make small and "stupid" errors through out their life. In regards to 4.01 and XHTMl, I was told that XHTML was the way to go since I am using CSS and php with in my files which XHTML was the best to support that?

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291401 posted 2:01 am on Apr 4, 2011 (gmt 0)

CSS and PHP can support any DTD. As of now I'm going with the HTML 5 DTD. As long as a page was written to be rendered in standards mode and not quirks mode, HTML 5 is completely backwards compatible with either XHTML or HTML of almost any flavor.

When it comes to XHTML, we have a great reference thread that gets into the issues pretty well Why most of us should NOT use XHTML [webmasterworld.com]

XHTML was one of those times where "everyone says" was not the best guidance to follow.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved