Page 70 - Trackpad_V2.1_Class6
P. 70
ATTRIBUTES
An attribute is used to define some extra features or properties of an HTML tag. All attributes
have two parts: name and value. The ‘name’ is the property that you want to set. The ‘value’ is
what you want for the respective property.
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>
68 Trackpad (V2.1)-VI

