Posted by: prajapatinilesh | September 14, 2007

Important Notes during programming

Writing HTML in a SCRIPT Element

<script type="text/javascript">
// This is an error!

// -->



Ampersands (&’s) in URLs

<!-- This is invalid! --> <a href="p1.php?chapter=1&section=2©=3=en">...</a>
To avoid problems with both validators and browsers, always use & in place of & when writing URLs in HTML
<a href="p1.php?chapter=1&section=2&copy=3&lang=en">...</a>


Incorrect Nesting of Elements

<B><I>Incorrect nesting</B></I>
<B><I>Correct nesting</I></B>


Using a NAME attribute with IMG or FORM

This problem is discussed in detail at JavaScript and HTML: possibilities and caveats.


Using all lowercase letters in a DOCTYPE

In a DOCTYPE, the formal public identifier–the quoted string that appears after the PUBLIC keyword–is case sensitive. A common error is to use the following:

<!doctype html public “-//w3c//dtd html 4.0 transitional//en”>

Here the formal public identifier (FPI) is all lowercase. The validator does not recognize the document as HTML 4.0 Transitional since the expected FPI for HTML 4.0 Transitional uses different case:

<!doctype html public “-//W3C//DTD HTML 4.0 Transitional//EN”>

Reference Site Name:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: