Jump to content

Need Definition of start-tag and SHORTTAG YES


RogerAF

Recommended Posts

Aloha from Honolulu,I'm learning XHTML by re-writing my homepage and validating it. So far I've rid it of five errors and I'm working my way down the page. But I have a few errors that have the same message: "unclosed start-tag requires SHORTTAG YES" an example: '<tr>' shows the '<' underlined and colored red. I've Googled for SHORTTAG YES and start-tag without finding anything that explains what these mean.Can someone explain them to me?So far, I get that it has something to do with how a tag is closed. Whether it is just a slash and greater-than like: '/>' or if the tag is in there too: ' </tag>' . Sometimes the </tag> is unacceptable, but I haven't figured out what determines that. It seems that mostly it wants to see /> I say that because I've changed several closing tags to that and the errors went away, but I'd like to understand why.I went to W3C site and tried to find it in the specifications, but got lost. Does anyone have a simple definition?Thanks in advance.Mahalo (Thank You),Roger

Link to comment
Share on other sites

This is probably because you forgot to close the last code with /> instead of only > like in an image.Can you post like the line with the error + some of the lines around the error? That would have helped a lot :)

Link to comment
Share on other sites

Aloha from Honolulu,Yes there are several of those I've found, but my question is still unanswered. What does SHORTTAG YES mean?Mahalo (Thank You),Roger

Link to comment
Share on other sites

Aloha from Honolulu,Yes there are several of those I've found, but my question is still unanswered. What does SHORTTAG YES mean?Mahalo (Thank You),Roger
Roger, I don't really know what is going on there but it sounds like andersmoen is on the right track. I would go ahead and post some of that code so someone can figure it out for you. Sorry I couldn't be of more help.By the way, I will be looking for an XHTML validator shortly... What are you using?Thanks,LifeInBinary.
Link to comment
Share on other sites

Guys, Roger wants a definition, not a cause for his problems.A short tag is an element that doesn't have a closing tag. In HTML, theese elements are <br>, <img>, <hr> and a few others (I think). In XHTML, the element is self closed, but it still counts as a short tag, scince there isn't another tag to close the opening one. The XHTML equivalents become <br />, <img />, <hr /> and the others in the same fashion.In DTD (the language that describes what is valid in a document), short tags are defined in boolean manner. An element either has a short tag or not. If YES, then <br /> is valid, but <br>content</br> is not. If NO, then <br /> is not valid, but <br>content</br> is.So, the error "unclosed start-tag requires SHORTTAG YES" means that a certain element (for example <tr>) has a start tag (<tr>) but there wasn't a closing tag (</tr>). The DTD has to provide SHORTTAG YES is order to allow this as a valid code, but it doesn't, so you get the error telling you that there is an unclosed tag and telling you when it was going to be valid.The reason for this error as pointed in this post and the above ones is most obviously unproperly closed element.

Link to comment
Share on other sites

How in the world are we supposed to help you if you won't help us?
Please try to take more helpful approach...
...So far, I get that it has something to do with how a tag is closed. Whether it is just a slash and greater-than like: '/>' or if the tag is in there too: ' </tag>' . Sometimes the </tag> is unacceptable, but I haven't figured out what determines that. It seems that mostly it wants to see /> I say that because I've changed several closing tags to that and the errors went away, but I'd like to understand why...
It might also be the use of "checked" or "selected" as a form attribute. Make sure you are say checked="checked" and/or selected="selected". But I'm not sure if the page you are having this problem with is/has a form.SHORTTAG YES/NO is the feature which allows you to abbreviated form attributes - as the example I mention to check.
Link to comment
Share on other sites

Roger,Sounds like there are a couple of people on here who are willing and able to help you with your problem. I don't know if you are away from your computer or very busy or anything, but again I will say this: If you post some of the code that is giving you problems, it will enable people to help you more specifically.No one on here is going to steal your code. For one, just a small section would not disclose much information. Also, most of the people on here have been making web pages for a while - they have probably seen and used code just like yours, if not better.This community has helped me more than I could ever express. They carried me from an HTML-curious guy with a little spare time, to a freelance web designer in only a couple months. Some of more experienced members of this forum have even been so kind as to assist me with my own paid project for a business client. I suggest you take their help...@ALL - Or maybe he posted the question, found the answer, and doesn't need us anymore? :)To whatever end,LifeInBinary.(By the way, Skemcin, if you see this I still need your help - I now have a deadline for Thursday).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...