XHTML 1.0 strict wont validate good code.

liunx

Guest
Ok, I have these errors:<br />
<br />
Below are the results of attempting to parse this document with an SGML parser. <br />
<br />
Line 46, column 59: there is no attribute "target" (explain...). <br />
...img/photo/yellow_flowers.jpg" target="blank"><img src=http://www.webdeveloper.com/forum/archive/index.php/"img/photo/thumb/flower<br />
.....................................................^<br />
Line 46, column 118: there is no attribute "border" (explain...). <br />
...photo/thumb/flower_thumb.gif" border="0" alt="Yellow Flowers" /></a></li><br />
.......................................................^<br />
<br />
<br />
<br />
<br />
When trying to validate my site <!-- m --><a class="postlink" href="http://www.mrpunkin.com/photo.html">http://www.mrpunkin.com/photo.html</a><!-- m --><br />
<br />
I looked up a list of XHTML tags and both border and target seem to be valid. Anyone know whats going on? It did it to my bgcolor="#ffffff" attribute as well in the <body> tag, but I fixed that controlling it with my CSS.<br />
<br />
BTW, I know the CSS margins are bad in anything but IE, but the CSS validates and I cant find what im doing wrong. Ill worry about that later.<!--content-->drop the target attribute all together, if you want that you have to use a frameset doc type or html 4.01 trans. For the borders use <br />
<element style="border:1px solid #000000;"> </element><br />
obviously replace the word element with img or div or whatever and then change the solid to dashed or dotted or however you want the border, the 1px is the thickness and the 000000 is obviosuly the color black. The validator cannot be used as a css debugger either.<br />
EDIT: I do not see any problems with margins on your site. It looks the same in mozilla as it does in ie. Elaborate on what the problems are. You do not need margins to position, I reccoment doing top:10px; left:10px; etc. You cannot usually realy on just absolute positioning or just realitve either, you are going to have to mix them together in many places.<!--content-->Originally posted by PeOfEo <br />
drop the target attribute all together, if you want that you have to use a frameset doc type or html 4.01 trans. <br />
According to "Designing With Web Standards", by J. Zeldman, the target=" " attribute validates with an XHTML 1.0 Transitional Doctype.<!--content-->Well that is not what the validator is saying <!-- m --><a class="postlink" href="http://validator.w3.org/check?verbose=1&uri=http%3A//www.mrpunkin.com/photo.html">http://validator.w3.org/check?verbose=1 ... photo.html</a><!-- m --><br />
You might try using target="_blank" that might be why it is tripping, because blank is not the name of a frame or anything like that. So if it were transitional it might then validate, but this is in strict so it is not a valid attribute.<!--content-->Originally posted by PeOfEo <br />
Well that is not what the validator is saying <!-- m --><a class="postlink" href="http://validator.w3.org/check?verbose=1&uri=http%3A//www.mrpunkin.com/photo.html">http://validator.w3.org/check?verbose=1 ... photo.html</a><!-- m --><br />
You might try using target="_blank" that might be why it is tripping, because blank is not the name of a frame or anything like that. So if it were transitional it might then validate, but this is in strict so it is not a valid attribute. <br />
I know, but you were saying that he could use either a Frameset Doctype, or a 4.01 Transitional if he wanted the target="_blank" in there; I was just mentioning that a XHTML 1.0 Transitional also would accept the target=" " attribute.<br />
<br />
Probably not making any sense... I'm so bored.<!--content-->Thanks guys, I got it to validate as transitional with _none for the target. Is it ok to have one of my pages be transitional and the others be strict?<br />
<br />
EDIT:<br />
<br />
Sorry, the margins are for the menu. Its off to the right in Mozilla, but in IE its fine with a 10px margin on top and on left.<!--content-->If you want to keep the Strict Doctype, you can use something like this:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"urltopage.html" onclick="target='_blank';">Linkageness</a><br />
<br />
That should also work for people with JS disabled, it just won't open a new window.<!--content-->http://forums.webdeveloper.com/showthread.php?s=&threadid=24359<!--content-->Thanks guys, I got it to validate as strict now. Now if any of you know CSS please checkout my post in the CSS forum ;)<!--content-->
 
Back
Top