You need to submit a full page, complete with appropriate headers etc. I did this with the following between the body tags: <p><a name="xyz" title="abc" href="">test</a></p> and it passed xhtml strict validation. So yes, it's legal. Cheers, Mat
in XHTML emplty tags should not be closed by the usual tag ender for that tag. if you put for example, <p></p> is invalid and should use <p /> instead. emplty tags must be closed with in. so unless u have <a>something</a> its invalid. use <a /> if u dont have the something. abt ur examples, <a name="xyz" title="abc" href=url></a> is invalid for two reasons. one, attribute values must be inside double quotes. so change href=url to href="url". two, as said earlier, empty tags should be closed with in. the valid version will be <a name="xyz" title="abc" href="url" /> <a name="xyz" title="abc"></a> this should be changed to <a name="xyz" title="abc" />
its all for better parsing and thus better uniformity. if u know how regular expression parsers work, then u will understand how a well defined set of rules outshine a loosely defined one.
That definitely makes sense. I just would have thought that <a some="something">soemthing</a> would be easier to parse than <a some="something" />, especially since some people will always mangle the code regardless
Don't forget the break tag. I always forget this: <br /> Also, you have to use a closing tag for scripts, don't you? A linked javascript goes <script type="text/javascript" src="file.js"></script> Code (markup): I think
the break tag too follows the same XHTML rule of empty tages. html has <br></br>. but in XHTML it is <br />. also horizontal rule, its <hr /> and not just <hr> in XHTML.