HTML - tags - body tag

revision:


Content

body" tag : defines the body of a document syntax some examples


"body" tag : defines the body of a document

top

The <body> tag defines the document's body. The <body> element contains all the contents of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc. There can only be one <body> element in an HTML document. The <body> element contains the entire content of a webpage. It must be the second element inside of the parent <html> element, following only the <head> element.

Attributes: the <body> element supports the global attributes and events attributes. Specific attributes include:

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.


syntax top

<body> . . . </body>


some examples

top

Codes:

                    <body>
                        <h1>This is a heading</h1>
                        <p>This is a paragraph.</p>
                    </body>