HTML - Tag

OBJECT

The <object> tag defines a container for an external resource.


The external resource can be a web page, a picture, a media player, or a plug-in application.


To embed a picture, it is better to use the <img> tag.
To embed HTML, it is better to use the <iframe> tag.
To embed video or audio, it is better to use the <video> and <audio> tags.

OPTGROUP

This tag is used to group related options in a drop-down list.

PICTURE

This tag gives web developers more flexibility in specifying image resources.

PRE

This tag defines preformatted text.


Text in a <pre> element is displayed in a fixed-width font, and the text preserves both spaces and line breaks. The text will be displayed exactly as written in the HTML source code.

PROGRESS

This tag represents the completion progress of a task.

SAMP

This tag is used to define sample output from a computer program. The content inside is displayed in the browser's default monospace font.

SCRIPT

The <script> tag is used to embed a client-side script (JavaScript).


The <script> element either contains scripting statements, or it points to an external script file through the src attribute.


Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.


Attributes

  • async - Specifies that the script is downloaded in parallel to parsing the page, and executed as soon as it is available. (before parsing completes) (only for external scripts)
  • crossorigin - Sets the mode of the request to an HTTP CORS Request.
  • defer - Specifies that the script is downloaded in parallel to parsing the page, and executed after the page has finished parsing. (only for external scripts)
  • integrity - Allows a browser to check the fetched script to ensure that the code is never loaded if the source has been manipulated.
  • nomodule - Specifies that the script should not be executed in browsers supporting ES2015 modules.
  • referrerpolicy - Specifies which referrer information to send when fetching a script.
  • src - Specifies the URL of an external script file.
  • type - Specifies the media type of the script.

SOURCE

This tag is used to specify multiple media resources for media elements, such as <video>, <audio>, and <picture>.

SUB

The <sub> tag defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, like H2O.

SUMMARY

This tag defines a visible heading for the <details> element. The heading can be clicked to view or hide the details.

SUP

The <sup> tag defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font. Superscript text can be used for footnotes, like WWW[1].

TEMPLATE

This tag keeps the content hidden from the client, the content can be made visible and rendered later by using JavaScript and rendered multiple times.