4 Basic tags in HTML
Mainly entire HTML document is divided into two parts: the head and the body. A new HTML page must have a declaration: . It tells browser that the following file is an HTML file. Basically four primary tags are used to build any webpage: , <head>,
Basic tags
As discussed earlier & tags contain entire web-page. This tag may contain <head>, <body>, <iframe>, etc.
<head> :
This tag is used to provide information for inner working of document. Document is nothing but your HTML page itself.
It contain
<head> defines document header. This tag end with tag.
It may contain other tags that define & manage document contents. Here are these tags
<head> tag is placed just after the tag & before <body> or <iframe> tag.
Head tags and thier descriptions:
Tag | Description |
---|---|
It defines the document title. | |
Defines a base URL for all the links on a page. | |
Defines a resource reference. | |
Defines meta information. |
:
It defines document title. Anything entered between
<body> :</body>
It defines document body. It contains body content. It ends with <body>.</body>It has following attributes:
Attributes | Description | Values |
---|---|---|
alink: | Defines color for active link. | rgb(x,x,x) or #xxxxxx or colorname |
background: | Sets a background image for a document. | URL |
link: | Sets hyperlink color which are not clicked by user. | rgb(x,x,x) or #xxxxxx or colorname |
vlink: | Set color for link which the user had followed. | rgb(x,x,x) or #xxxxxx or colorname |
bgcolor: | It defines document background color. | rgb(x,x,x) or #xxxxxx or colorname |
text: | Changes body text color from default value. | rgb(x,x,x) or #xxxxxx or colorname |
title: | Specifies extra information about an element. | text |