Tuesday, July 28, 2009

On the proper use of quote with html attribute values...

A very short rant.

When your HTML tags contain attributes such as "...width='10%'>", please, please, please use quotes around the value. There may come a time when somebody has to take your code and turn it into XHTML, which requires quotes; moreover, there may come a time when somebody has to take your code and generate it on the server side using JSP or ASP... which will not take kindly to that "...10%>".

So please, use quotes around your HTML attribute values. Or my son will kick you.

No comments: