When writing in HTML, the
tag is used to contain a web page’s content, including hyperlinks, images, tables, text, etc. It is required in every HTML document, and there may only be onetag per page. The following sections contain information about this tag, including related attributes and browser compatibility.Example of thecode
Below is an example of HTML with the body tag and its contents highlighted in bold text.
- Example of thecode.
- Deprecated attributes.
- Compatibility.
- Related information.
<!doctype html>
This is a heading
This is an example of a basic HTML page.
Deprecated attributes
Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. Every attribute unique to the
tag is deprecated, meaning that it may function currently, but is not supported in going forward. In this case, CSS should be used in place of these attributes.Compatibility
Browser, Compatibility, Container tag, CSS, Hyperlink, Image, Table, Text, Web design terms
Related information
- How to change the background and text color of a web page.
- HTML and web design help and support.