HTML tag

HTML tag defines the main content of an HTML document which displays on the browser. It can contain text content, paragraphs, headings, images, tables, links, videos, etc.

The must be the second element after the tag or it should be placed between and

tags. This tag is required for every HTML document and should only use once in the whole HTML document.

Syntax

Following are some specifications about the tag

Display Inline
Start tag/End tag Both start and End tag
Usage Structural

Example

Test it Now

Output:

HTML body tag

Attribute

Tag specific Attributes

Attribute Value Description
alink color It defines the color of the active link in a document. (Not supported in HTML5)
background URL It determines the background image for the document. (Not supported in HTML5)
bgcolor color It determines the background color of the content. (Not supported in HTML5)
link color It determines the color of the unvisited link. (Not supported in HTML5)
text color It determines the color of the text in the document. (Not supported in HTML5)
vlink color It determines the color of the visited link. (Not supported in HTML5)
onload Function call on page loading
onunload Function call when user leaves the page
onfocus Function call when document receives focus by user.
onblur Function call when document loses focus by user.

Global Attribute

The attribute supports global attribute in HTML.

Event Attribute

The attribute supports Event attributes in HTML.

Supporting Browsers

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
Yes Yes Yes Yes Yes
Next TopicHTML br Tag




Hot Tutorials

Contact US

Email:[email protected]

HTML body Tag
10/30