"element "TEXT" undefined error |
"element "TEXT" undefined error |
1q2w3e4r |
May 30 2012, 11:54 PM
Post
#1
|
Group: Members Posts: 5 Joined: 30-May 12 Member No.: 17,200 |
I have this little website I'm making from a web template I found, and "apparently" the template wasn't 100% correct, the validator at w3schools didn't like some of the things going on. The item that I am currently trying to fix is the text under the links on the left hand side, that say things like "home page". "about me". etc. Does anyone know how to fix the "element undefined" error that the validator gives me? Here is what I have for my code:
CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>/index.html</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <div id="header"> <h1>asdf.org</h1> <h2>  place to waste time</h2> <br /> <hr /> </div> <!-- end header --> <div class="spacer"></div> <div id="left"> <div id="leftcontent"> <ul> <li><strong><a href="./index.html">home</a></strong></li> <text>home page</text> <li><a href="./about.html">about me</a></li> <text>about</text> <li><a href="./blog.html">blog</a></li> <text>random discussions</text> <li><a href="./things.html">things i've done</a></li> <text>nothing special</text> <li><a href="./contact.html">contact me</a></li> <text>email or other</text> <li><a href="./etc.html">/etc</a></li> <text> anything else</text> </ul> <p> </p> <!-- <h3>News</h3> <p class="news">1/14 | Idea conceived<br />1/17 | Semester starts<br />1/19 | Design completed</p> --> </div> <!-- end left content --> </div> <!-- end left division --> <div id="main"> <div id="maincontent"> <h3 class="top_main_heading">asdf</h3> <p>asdfasdfasdf</p> <h3>asdf</h3> <p>asdfasdf</p> <h3>website design</h3> <p class="boxed"> asdfsdfsadfasdf <br /> </div> <!-- end main content section --> </div> <div id="footer"><div class="spacer"></div> <hr /> <p class="left">| <a href="http://jigsaw.w3.org/css-validator/">CSS</a> | <a href="http://validator.w3.org/check?uri=referer">XHTML 1.1</a> |</p> <p class="right">design by Adam Patricka, recreated by Matt Hollis, edited by ekaj</p> <p> </p> </div> <!-- end footer --> </div> <!-- end container --> </body> </html> and here is the CSS if that's helpful, I didn't want to spam everything on one page. Any advice is much appreciated. If you're feeling especially generous, I would appreciate input on any other error as well. |
Frederiek |
May 31 2012, 01:25 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
There is no element TEXT in HTML. Use a more appropriate element, such as P or SPAN, put them inside LI and style them in CSS.
And you have some NBSP's that are not terminated by a semi-colon. Use the WDG validator (links at the top/bottom of every page here), as it provides links to the HTML reference for guidance. |
pandy |
May 31 2012, 02:52 AM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
w3schools just link to the w3c validator, so that should be OK.
1q2w3e4r, in case you don't realize it, w3schoold aren't related to w3c, they just use their name to gain credibility. Their teachings aren't always all that. Use them if you like them, but be aware that unlike the godlike w3c they sometimes get it wrong. Regarding the w3c validator, you'll have more options if you use the standard interface. http://validator.w3.org/ |
Frederiek |
May 31 2012, 08:04 AM
Post
#4
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
And I didn't even know w3schools had a link to a validator.
Anyway, the links to the reference from within the WDG validation results come in handy to look up the proper usages of elements. |
pandy |
May 31 2012, 08:52 AM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
I've looked for it before...
I also prefer "our" validator. For the reason you say but also because the w3c one has become way to wordy for me. It annoys me to have to go through all the prose. I want to scan, quickly, and get a good overview of the result. Doesn't take many errors to bring out the scrollbar at w3c. |
1q2w3e4r |
May 31 2012, 12:41 PM
Post
#6
|
Group: Members Posts: 5 Joined: 30-May 12 Member No.: 17,200 |
Thanks, I got the <text> thing fixed! I edited the <p> tag in the CSS for "#leftcontent p"... now I have one more page I need to fix!
I have a little HTML form linked to a PHP script so users can input comments or whatever... and it works fine in IE, BUT in Chrome and FF the boxes show up incorrectly. Could anyone tell me how to fix that, so the validator (I've been using the one on this website) doesn't go crazy? This is the source to the page: http://pastebin.com/3aRLbjJP ... Once again, any help is much appreciated! |
Lo-Fi Version | Time is now: 26th April 2024 - 09:14 AM |