Basic Tags
<html> Defines an HTML document
<body> Defines the document's body
<!-- --> Defines a comment
<br> Inserts a single line break
<hr> Defines a horizontal rule
<h1> to <h6> Defines header 1 to header 6
<p> Defines a paragraph
<html>
Informs the browser the current document is a html document.
example
<html><body><p> Hello world</p></body></html>
<body>
It defines the Body of html. The body tag can contain following attributes
body attributes
TEXT=rgb(x,x,x) |#xxxxxx color of the text of the document *see html color spec for details
BGCOLOR=rgb(x,x,x) |#xxxxxx color of the background of the document
BACKGROUND=url location of the image to be used as background
LINK=rgb(x,x,x) |#xxxxxx color of all the links of the document
ALINK=rgb(x,x,x) |#xxxxxx color of the current we page link
VLINK=rgb(x,x,x) |#xxxxxx visisted document link color
Apart from these attributes the body tag can have standard attributes and event attributes, Which will be discuused later on in this section.
learn by doing - Body
Paragraphs
Paragraphs of text this usally have line breaks inserted before and after while rendering in the browser
Sytnax: <p> </p>
Important attributes: align=left|right|center default is left
learn by doing - Paragraphs
HTML comments
<!-- you cannot see me when the document is rendered in the browser -->
snytax <!-- -->
Line break
syntax:<br/>
To insert new line
Horizontal Line
Syntax:<hr/>
to draw a horiziontal line
vivarem learn by doing more advanced html tutorial with online practice |