Wednesday, December 21, 2011

To quote or not to quote...

When you program in HTML, you often have to specify parameters in certain tags, such as:
<HR WIDTH=80%>
If you code by hand, you might sometimes decide to leave out the quotes around the parameter values such as 80% in the above example. Although most browsers will excuse this, it is incorrect not to place quotes around values that aren't plain numeric values.
For example
<HR WIDTH = 500>
is correct, however the following is incorrect:
<HR WIDTH = 80%>
because, the latter contains a non-numeric character -- "%" Following is the proper way to specify your HTML parameters:
<HR WIDTH = "80%">

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Best Web Hosting