Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   </A> not needed? (http://www.velocityreviews.com/forums/t303580-a-not-needed.html)

SamuŽl van Laere 06-24-2006 11:56 PM

</A> not needed?
 
I've allway's thought this was correct:
<ul>
<li><a href=http://www.someurltoadd.com>Click Me</a></li>
</ul>

But it isn't.

The W3C HTML Validator doesn't want the ending </a> tag there.
Why is that?
I mean, it looks better with right?

Cheers,
Sam



mbstevens 06-25-2006 12:12 AM

Re: </A> not needed?
 
On Sun, 25 Jun 2006 01:56:50 +0200, SamuŽl van Laere wrote:

> I've allway's thought this was correct:
> <ul>
> <li><a href=http://www.someurltoadd.com>Click Me</a></li>
> </ul>
>
> But it isn't.
>
> The W3C HTML Validator doesn't want the ending </a> tag there.
> Why is that?
> I mean, it looks better with right?


There is a server error on that address,
so I can't look at the source. But you are
probably not using a doc type that uses a closing tag.
Go to w3c org and read about doc types.



SamuŽl van Laere 06-25-2006 12:15 AM

Re: </A> not needed?
 
> There is a server error on that address,
> so I can't look at the source. But you are
> probably not using a doc type that uses a closing tag.
> Go to w3c org and read about doc types.
>
>


The address is:
http://www.oukje.nl/
Everything validates, includes a doctype and everything.

Any thoughts?

Cheers,
Sam



SamuŽl van Laere 06-25-2006 12:23 AM

Re: </A> not needed?
 
"mbstevens" <NOXwebmasterX@XmbstevensX.com> schreef in bericht
news:pan.2006.06.25.00.12.44.642484@XmbstevensX.co m...
> There is a server error on that address,
> so I can't look at the source. But you are
> probably not using a doc type that uses a closing tag.
> Go to w3c org and read about doc types.



Its wierd.
When I add the closing href tag </a> the validator
won't validate the website succesfull.
And without it, it will.
Could it be because of UTF8?

Cheers,
Sam



Jonathan N. Little 06-25-2006 12:24 AM

Re: </A> not needed?
 
SamuŽl van Laere wrote:
>> There is a server error on that address,
>> so I can't look at the source. But you are
>> probably not using a doc type that uses a closing tag.
>> Go to w3c org and read about doc types.
>>
>>

>
> The address is:
> http://www.oukje.nl/
> Everything validates, includes a doctype and everything.
>
> Any thoughts?


Bug. Not the first time. The closing tag is not optional see:

http://www.w3.org/TR/html4/struct/links.html#edef-A

"Start tag: required, End tag: required"


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

dorayme 06-25-2006 12:46 AM

Re: </A> not needed?
 
In article <c6623$449dd136$d52e1f47$27874@news.chello.nl>,
"SamuŽl van Laere" <webkluns@hotmail.com> wrote:

> I've allway's thought this was correct:
> <ul>
> <li><a href=http://www.someurltoadd.com>Click Me</a></li>
> </ul>
>
> But it isn't.
>
> The W3C HTML Validator doesn't want the ending </a> tag there.
> Why is that?
> I mean, it looks better with right?
>
> Cheers,
> Sam


You need the closing, also, put " " around the url...

--
dorayme

mbstevens 06-25-2006 12:56 AM

Re: </A> not needed?
 
On Sat, 24 Jun 2006 20:24:24 -0400, Jonathan N. Little wrote:

> SamuŽl van Laere wrote:
>>> There is a server error on that address,
>>> so I can't look at the source. But you are
>>> probably not using a doc type that uses a closing tag.
>>> Go to w3c org and read about doc types.
>>>
>>>

>>
>> The address is:
>> http://www.oukje.nl/
>> Everything validates, includes a doctype and everything.
>>
>> Any thoughts?

>
> Bug. Not the first time. The closing tag is not optional see:
>
> http://www.w3.org/TR/html4/struct/links.html#edef-A
>
> "Start tag: required, End tag: required"


Yes, I think you're right. The validator is claiming there was no <a...>
tag. There is an empty <a></a> pair above the first error link that may
have caused the validator to make a mistake, I don't know.

I would advise the op to
indent the markup in a readable way (no 500+ character lines!). This seems
to be my pet peeve today, but why would one post markup to a group that
places entire <ul>....</ul> blocks on a single line? Are we expected to
read this stuff? The rest of the page is formatted for human readers. Why
not at least get the line with the error on it humanly readable before
posting? It might just clear up the problem.



Adrienne Boswell 06-25-2006 12:56 AM

Re: </A> not needed?
 
Gazing into my crystal ball I observed "SamuŽl van Laere"
<webkluns@hotmail.com> writing in news:c6623$449dd136$d52e1f47$27874
@news.chello.nl:

> I've allway's thought this was correct:
><ul>
><li><a href=http://www.someurltoadd.com>Click Me</a></li>
></ul>
>
> But it isn't.
>
> The W3C HTML Validator doesn't want the ending </a> tag there.
> Why is that?
> I mean, it looks better with right?
>


Here's the error:
<a href=http://www.oukje.nl/weblog/index.php?id=4
The validator is looking for <a href=" , so it thinks that the A element
is not open, therefore </a> is throwing an error.



--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share


Brian Cryer 06-25-2006 06:54 AM

Re: </A> not needed?
 
"Adrienne Boswell" <arbpen@yahoo.com> wrote in message
news:Xns97ECB6736F989arbpenyahoocom@69.28.186.121. ..
> Gazing into my crystal ball I observed "SamuŽl van Laere"
> <webkluns@hotmail.com> writing in news:c6623$449dd136$d52e1f47$27874
> @news.chello.nl:
>
>> I've allway's thought this was correct:
>><ul>
>><li><a href=http://www.someurltoadd.com>Click Me</a></li>
>></ul>
>>
>> But it isn't.
>>
>> The W3C HTML Validator doesn't want the ending </a> tag there.
>> Why is that?
>> I mean, it looks better with right?
>>

>
> Here's the error:
> <a href=http://www.oukje.nl/weblog/index.php?id=4
> The validator is looking for <a href=" , so it thinks that the A element
> is not open, therefore </a> is throwing an error.


Adrienne is quite right - always put quotes around the address, so:
<a href="http://www.someurltoadd.com">Click Me</a>
and NOT:
<a href=http://www.someurltoadd.com>Click Me</a>
--
Brian Cryer
www.cryer.co.uk/brian



David Dorward 06-25-2006 07:02 AM

Re: </A> not needed?
 
SamuŽl van Laere wrote:

> <li><a href=http://www.someurltoadd.com>Click Me</a></li>


> The W3C HTML Validator doesn't want the ending </a> tag there.
> Why is that?


It is an oddity of SGML. Even though browsers don't generally support it,
the first slash character in the URL ends the tag, and the second ends the
element.

What you have there is, IIRC, the same as:

<li><a href="http:"></a>www.someurltoadd.com&gt;Click Me</a></li>

If an attribute consists only of certain characters, then quotes are
optional, but its easier not to try to remember those excepts and simply
work to the rule "Always quote attribute values".

http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


All times are GMT. The time now is 12:21 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.