Page 87 - 2403_Trackpad_V5.1_C5_Fb
P. 87
Syntax to specify the attribute of any tag:
<tag_name attribute_name = “value”>
HTML COMMENTS
Comments are used to add notes or explanations within an HTML document. They help the
programmer by making it easier to understand and edit the document later. You can add
comments using a special tag, which looks like this: <!-- comment goes here -->.
For example, <!-- This is a comment in HTML -->
RULES FOR WRITING HTML CODES
There are some rules for writing HTML codes:
Container tags should always be closed properly.
Values given to the attributes should be enclosed within the double-quotes.
Tag name should not contain spaces.
There should be no space between < and > in a tag.
Tags must be nested correctly.
STRUCTURE OF AN HTML DOCUMENT
The structure of an HTML document is:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE> The title of the webpage goes here. </TITLE>
</HEAD>
<BODY>
All the visible content of the webpage is documented here,
containing bulk of information. The section contains various
HTML tags defining the structure and layout of the page content.
</BODY>
</HTML>
The DOCTYPE declaration at the beginning of page specifies that the document is written in
HTML5. In HTML5, the DOCTYPE declaration is required.
Introduction to HTML5 85

