Sunday, October 14, 2012

Delete Space After Link in HTML

Have you noticed that sometimes you have white space included in your link in the end when you use <a href=""><a/> tag?

Here is an example: Weird Link .

If you look closer you will see white space after the link although I didn't include any in HTML (sorry for the link formatting, it is probably hard to see). I wanted to fix it using CSS but after 15 minutes recognized that it goes away if you put the closing tag </a>  right after the text and not on the next line.

So, this is the same link but with the closing tag on the same line: OK Link.

May be it is intended to be like that but it is still strange that Next Line character is treated like a Space character.

No comments:

Post a Comment