Here
are some tips which must follow while developing a webpage(s). This is not only
improving your proper coding standards but also improve page performance too.
Self-closing tags – All html
tags used in page must be closed as, with and
with
.
with
.
Close all tags – Tags like
andand
Quote attributes – The use of
quotes i.e. id= “myControlID” instead of id= myControlID.
Consistent case – All HTML code
should be of the same Case, for instance tag should be .
This makes XHTML validation easier if all the code is lowercase. This can be
set as an option in Visual Studio HTML editor.
Use entities – Reserved
characters are converted to their special sequences (as per W3C) for instance:
< will be <
> will be >
& will be &
‘ will be '
“ will be "
Page Title:
Do not left page title blank.
ALT and
Title Tag: Image Alternate text and Title for Image Alternate Text or for
anchor. Alt and Title should not leave blank.
Included
Script: Script type and script language should be mentioned while including JavaScript
in your html page.
External
CSS: try to use external css file over Internal Style or Style for particular
controls.
Comments