English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
HTML <h2> The <h tag defines the second-level heading in an HTML document. This tag is also commonly referred to as <h2> element.
HTML h2Title:
!doctype html <html> <head> <meta charset="UTF-8"> <title>HTML5 H2Usage of tags (Basic Tutorial Website oldtoolbag.com)</title> </head> <body> <h1>Heading 1</h1> <p>This is the content that would appear under Heading 1.</p> <h2>Heading 2</h2> <p>This is the content that would appear under Heading 2.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support <h2> Tag.
HTML <h2> element is located within the<body> tag.
The range of headings can be from<h1> to<h6>.1> The least important heading is<h6>.
in<h1> after the heading to find<h2> headings. Do not skip heading levels.
<h2> headings are usually displayed in font size smaller than<h1> for small headings.
Do not just use<h2tags to apply other formatting.<h2tags are used to define heading levels, for example in a table of contents.
In HTML 4.01 in, <h2> tag's "align" attribute has been deprecated. In HTML 5 in, <h2The "align" attribute of the element is not supported. Please use CSS to align elements.
Attribute | Value | Description |
---|---|---|
align | left center right justify | HTML5 Not supported. HTML 4.01 Deprecated. Defines the alignment of the title text. |
<h2tag support HTML Global Attributes.
<h2tag support HTML Event Attributes.
HTML Tutorial:HTML Titles