Page 81 - ConceptGP_C6_Fb
P. 81
Syntax to specify the attribute of any tag:
<tag_name attribute_name = “value”>
For example, the <HR> tag has a COLOR attribute, which allows changing the colour of the line.
<HR COLOR = “RED”>
HTML COMMENTS
Comments are used to write notes about the concerned HTML document. This helps the
programmer in editing the document later. Any program description can be added in the form of
comments. We can add comments in our program using a comment tag <!-- -->.
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.
Learn HTML5 and CSS3 79

