Sunday, October 16, 2005

An HTML trivia

Something that I noticed today. Suppose I want to link to my previous post. I type the link name in between

a href="http://locana.blogspot.com/2005/10/top-universities.html" and /a,

of course with the right brackets. The output appears as Top universities. Now suppose I make a typo that instead of "=" I put a minus "-" after a href. i.e., I type "Top universities" in between

a href-"http://locana.blogspot.com/2005/10/top-universities.html" and /a;

Here's the output: Top universities. The output links to the current page!

2 Comments:

At 6:38 AM, Anonymous Anonymous said...

Although it is invalid HTML, modern day browsers aren't all that dumb.

What with quirks mode rendering, and several other things, todays browsers very rarely goof up, even if the webmaster does.

I've seen that almost 50% of the web-content is invalid code as per W3. I find it very amusing.

Meanwhile... if you wish to depict "<" in a regular post without it being misunderstood as a tag, use < (use > for the other ~ less than and greater than)

 
At 1:24 AM, Anonymous Anonymous said...

Thanks Saket. Yes, the output is browser dependent, which I noticed only later. The "wrong" link doesn't work at all with explorer.

 

Post a Comment

<< Home