Validation eror

SpaceshipSpaceship
Watch

Windpuffs

Established Member
Impact
0
When I try to validate my page I get the following error message:

Line 38, column 0: unclosed start-tag requires SHORTTAG YES​

What are they asking me to do?? (Please be specific -- I'm new!)

Thanks!

(ironically, it's the addition of the W3C validator icon that's giving me this grief!)
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
a little piece of code might be useful in order to help you.
 
0
•••
Does you img tag end with "/>"? If you're using XHTML, it should. For example:

Code:
<img src="blah.png" alt="Blah" />
 
0
•••
Yes, checked and double-checked. This is what I have that gets the message:

<p><a href="http://validator.w3.org/check/referer" target="_blank"><img src="w3c.gif" alt="" width="87" height="31" border="0"/></a></p>

I get the same message even if I copy and paste it exactly as they have it posted on their site.
 
0
•••
First of all, XHTML doesn't have a target attribute, nor the border attribute for img tags.

That said, the error might be somewhere before that. You could try posting a link to the page so we can look it over.
 
0
•••
Hi, Thanks, Yes! That would be great! To simplify matters, I put the code back to exactly the way it was when it validated, and then added in the code that causes it to no longer validate, which comes from a copy/paste from the W3 site. The web site is at:




It sure would be great if someone could find the problem. Re: the bit about "target = blanK" & "Border = 0", what's the correct way to get it to open in it's own window and not have a border around the link? The Firefox link didn't give this trouble, and it has the same attributes....? (am I whining?)
 
0
•••
Hello Windpuffs,

The error is

<div class="w3c"

does not close, it should be

<div class="w3c">

Nanobot you are correct that XHTML does not have those attributes but in a transitional document this is allowed.
 
0
•••
Got it -- thanks a million, guys, now I can go to bed!
 
0
•••
Windpuffs said:
Re: the bit about "target = blanK" & "Border = 0", what's the correct way to get it to open in it's own window and not have a border around the link? The Firefox link didn't give this trouble, and it has the same attributes....? (am I whining?)

For the border, you could do:

Code:
<img src="blah.png" alt="Blah" style="border:0" />

Although it's usually better to put style information in the document header, via a stylesheet link or a style tag.

As for the target thing, among standards advocates, it's generally considered bad practice to use techniques that open pages in new windows. A lot of users (including myself) simply don't like not knowing where the window will open up. The target attribute and its functionality was removed in HTML 4.01 strict and beyond. CSS 3 will offer a way to pull off the same effect, but that's a long time coming. Your only real alternative right now, if you want it to validate as XHTML, is to use a JavaScript trick. Do something like this:

Code:
<a href="blah.html" onclick="window.open('blah.html')">Link</a>

window.open() isn't technically a standard, but all of the major graphical web browsers support it. Still, if I were you, I wouldn't add this functionality at all.

Elefekt said:
Nanobot you are correct that XHTML does not have those attributes but in a transitional document this is allowed.

Windpuffs already said in another thread that he/she was rewriting the site in XHTML, so that's what I assumed we were talking about. And I was right. ;)
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Catchy
CatchDoms
DomainEasy — Payment Flexibility
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back