View Full Version : XHTML Validation
03-28-2005, 09:13 PM
Hi im new to the forums here and feel quite small between all you experts. Just wondering if someone can help me because im quite new to websites myself. Below is the link for the validation.
And before you say, Yes i have read the mini descriptions but still no help to me... If Anyone could help me with any any of the faults i will be greatfull. Thanks
03-28-2005, 09:24 PM
This is a html issue, and should be posted in the html/css forum;).
However, to get a insight on what these error messages mean, you need to understand the differences from HTML. Everything must be lowercase, all the tags must be closed etc (but thats the same in html).
Take a look at http://www.w3schools.com and http://www.w3.org/TR/xhtml1/ for a better look on XHTML.
Just to let you know that you can only use "id" once for that specific class, as it is a unique id. To use the same class more than once in the same document you have to use class = i.e instead of <div id="whatever">, use <div class="whatever"> if you are going to use the same class more than once.
Also, everything has to be lowercase, and stuff like font-family etc needs to be in a actual css document rather than in the html itself. Put the font size inside your p class in your css stylesheet etc..for text rather than the old deprecated <font size="xxxx"> element. i.e. <p class="whatever">blah blah</p>
btw, Welcome to CodingForums:)
(From the moderator: XHTML validation questions are welcome here. XHTML is almost always the first XML language anyone learns.)
03-29-2005, 04:19 AM
Talk about XML and related technologies such as XSL, XHTML here.
that is what it says under the description for this forum may be out of place I dunno.
Anyways, when it says height doesn't exist well technically it doesn't, you need to use css to declare the heights, and widths, and in place of align you need to use vertical-align in css which only works on text, same goes with the font tags, they shouldn't be used in xhtml
03-29-2005, 04:27 AM
well, i wouldn't be too harsh. XHTML is XML...and most of his problems would only occur in XHTML, so lax off a little bit.. I think its fine.
If you know how to read those error messages, it helps...
I've listed the error message, and then how to fix it beneath it (on some), then an explanation
you don't need language in xhtml...type will do fine
<td height="136" colspan="3" valign="top"><img src="Images/Banner.gif" alt="...
This can be a bit tricky...You need to declare the height and the valign in your css stylesheets...its called separation of presentation and content...
Third error and Fourth error:
Same idea as the second error.
font is not an element in XHTML...use stylesheets to create bigger text.
[b]Error 8, 9
<div id="Layer1" style="position:absolute; left:19px; top:185px; width:166
<div class="Layer1" style="position:absolute; left:19px; top:185px; width:166
You can't declare the same ID twice. If you have a two or more elements that you want to style the same, use class. Also, if you do use classes, you shouldn't be using inline style="" attributes...
Hope this helps. If you have any more questions, write back
03-29-2005, 05:56 AM
HI guys thanks for the help :d. Can someone show me an example of XHTML and HTML so i can see the difference please? Sorry if i miss posted this, But when i created the page in dreamweaver it gave me the option of creating an XHTML page so i assumed the page would then be XHTML. Silly me. :eek:
03-29-2005, 09:23 AM
Hi. Have made a new topic in the CSS section about the height, valign.... Completley confused about how to add this into the stylesheet! Please check it out and help me! Thanks
03-29-2005, 06:57 PM
XHTML is just HTML following the rules of XML (along with removing presentational elements and attributes that were in HTML).
03-29-2005, 07:03 PM
Do not cross-post, we will delete your previous post shortly.
...and this is the right place -- XHTML is fine in the XML forum, as it's the best place. We tend to overlook XHTML questions in the HTML forum, as typically users send it as text/html anyhow, or dynamically swap out.
03-30-2005, 03:07 AM
Okay, I saw 3 errors (2 of the original 5 are redundant).
Error 1: You need to add a "/" to the end of the tag (<br />)
Error 2: Just tells where error 1 started and therefore is redundant.
Error 3: Same as error 1 except on an img element (<img ... />)
Error 4: Just tells where error 3 started and therefore is redundant.
Error 5: Delete the tag.
Edit: For future problem-solving, you should turn on the "Show Source" option when validating. This way, you have a more visual idea of where in your file the problem is. Notice that the errors generated have line numbers. Turn the "Show Source" option on and you can scroll down past the errors to the appropriate line number (or click on the line numbers since they become hyperlinks to the proper lines in the source).
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.