HTML details Tag

HTML details Tag defines additional details about specific term that user can read by revealing it. User can open and close the detail widget on a click.

Syntax of HTML details Tag

The Syntax of HTML details Tag is shown below, It has both starting and ending tags.

<details>
Markup language used to create Web Pages.
</details>

Usage of HTML details Tag

HTML details Tag is used to define an area which is hidden by default. This area contains the detail about a specific term. User can reveal the details on a single click and then it can be reclosed as well.

HTML details Tag is used with summary tag, which contains the term that is being described with help of details tag.

Example of HTML details Tag

Simple example of HTML details Tag is shown below.

<details>
<summary>HTML</summary>
<p>Markup language used to create Web Pages.</p>
</details>

Output

The output of above HTML code is shown below.

HTML

Markup language used to create Web Pages.

open attribute is used inside the details Tag to define that the details should be visible to the user by default, it's example is given below.

CSS

Cascading Style Sheet used for presentation of Web Page.

Browser Support for HTML details Tag

HTML details Tag is supported by all major browsers including Safari and Internet Explorer.

Global Attributes Support in HTML details Tag

The HTML details Tag supports all Global Attributes.

Event Attributes Support in HTML details Tag

The HTML details Tag supports all Event Attributes.

HTML details Tag Video

Watch our video on HTML details Tag and subscribe our Youtube Channel.

HTML Comment Tag HTML Doctype Tag HTML anchor Tag HTML abbr Tag HTML acronym Tag HTML address Tag HTML applet Tag HTML area Tag HTML article Tag HTML aside Tag HTML audio Tag HTML b Tag HTML base Tag HTML basefont Tag HTML bdi Tag HTML bdo Tag HTML big Tag HTML blockquote Tag HTML body Tag HTML br Tag HTML Button Tag HTML Canvas Tag HTML Caption Tag HTML Center Tag HTML Cite Tag HTML Code Tag HTML Col Tag HTML colgroup Tag HTML data Tag HTML datalist Tag HTML dd Tag HTML del Tag HTML details Tag HTML dfn Tag HTML dialog Tag HTML dir Tag HTML div Tag HTML dl Tag HTML dt Tag HTML em Tag HTML embed Tag HTML fieldset Tag HTML figcaption Tag HTML figure Tag HTML font Tag HTML footer Tag HTML form Tag HTML frame Tag HTML frameset Tag HTML Heading Tags HTML head Tag HTML header Tag HTML hr Tag HTML html Tag HTML i Tag HTML iframe Tag