HTML CodingStd
HTML CodingStd
References made to any Web page located outside xyz.com should be made using fully qualified (using the full URL) hyperlinks. For example: <A HREF="http://www.w3c.org">W3C</A>. When coding for the directory level (index.html) file of your own directory, links should be coded as: <A HREF="/">Index></A>. When coding for the directory level (index.html) file of another directory, links should be coded using the trailing slash: <A HREF="/ir/"></A>. A Web page should never have a hyperlink, which references itself. If a self-referencing link appears on a site's navigation, the anchor tag should be commented out. This applies to both text links and images, which act as links (including area coordinates on an image map).
1.6. Cookies
Use of cookies is allowed within reason. Cookies are usually implemented via JavaScript, Java, CGI or any variety of methods.
Note that not all browsers support cookies. On top of that, cookies are often viewed as an invasion of privacy, and some users will be turned off by your using them. Be judicious and limit cookie usage or otherwise ensure that cookies are not mandatory for users to use your site. Please make sure that any cookie usage is compatible with privacy policy.
1.10. Frames
The use of frames is discouraged because they can often lead to confused users and maintenance nightmares if improperly done. For this reason, frames should only be used in a logical manner when they will provide a clear benefit that is unattainable without the use of frames. If you chose to use frames, it is recommended that you also implement a non-frames version.
4 5 6 7 8 9
Sl. No. 10
Guidelines Always use <META> element to refresh a page after a specified time. Example: <META HTTP-EQUIV="Refresh" CONTENT="10"> Use <META> tag to provide keywords for the document to be indexed. Example: <META NAME="author CONTENT="Ian Graham"> <META NAME="keywords" CONTENT="html documentation web url"> <META NAME="editor CONTENT="HTML SuperPro"> If you want browser to know the document is an index document, include the <ISINDEX> tag. This causes the browser to create a user-input field into which the user can type words to be used in an index search. Example: <HEAD> <ISINDEX> ... </HEAD> Style sheet should always be referenced using <STYLE> tag and enclosed within, this must be declared within <HEAD> tag only. Example: <HEAD> <LINK="STYLESHEET" TYPE="TEXT/CSS HREF="filename.css"> </HEAD> Scripting code should always be enclosed with <SCRIPT></SCRIPT> tags. The tags should also contain information such as the Scripting language and specify if the script is running on the server or at the client-end. Example: <SCRIPT LANGUAGE=javascript> var formfield=; </SCRIPT> OR Calling from a Java Script file, <SCRIPT LANGUAGE="javascript" type="text/javascript" SRC="help.js"></SCRIPT> Use entity references instead of character references. Some browsers have characters reserved to display certain attributes, such as HTML elements and graphic characters. Example: Use < to print < Use Headings to highlight topic headings and sub-heading. HTML allows for 6 levels of headings. Example: <H1 align=center>Heading One</H1> Wherever possible, all Tags (except singleton tags like INPUT, IMG etc) should have corresponding closing tags. Example: <FORM ACTION="myfile.cfm" METHOD=POST> .............. </FORM> If the closing tag is missed out, some browsers used to take acre automatically and this does not affect in displaying the content, but this should not be relied upon. All display fields and frames must be included within a table to avoid alignment and resolution
11
14
15 16
17
Sl. No.
Guidelines problems. While declaring the WIDTH in the <TABLE> or <TD> tag, declare as percentage or pixel width as per your requirement (WIDTH=100% or WIDTH=500)
Window.document.form Object window.document.form o window.document.form.textarea o window.document.form.text o window.document.form.fileupload o window.document.form.password o window.document.form.hidden o window.document.form.submit o window.document.form.reset o window.document.form.radio o window.document.form.checkbox o window.document.form.button o window.document.form.select o window.document.form.select.option
3. Reference Sites
http:// developer.netscape.com/docs/manuals/communicator/jsref/but1.htm