HTML Empty Element

HTML Empty Element

HTML empty element

An HTML element without content is called an empty element.

The Empty element is closed in the opening tag (<br />).

But even if you don't close the empty tag in HTML (5). But if you want to validate or read your document with an XML parser, then you must close all the elements correctly.

 Element

    Description

      <area>

     Sets the area of the <map> tag.

     <base>

     Specifies the original URL of all links used on the page.

     <br>

     Breaks a line.

     <col>

     The <colgroup> element is used to set the column

     <embed>

     Used to display embedded files, images, plug-ins.

     <hr>

     The two sections create horizontal lines to represent the keys separately.

     <img>

     Used to display images.

     <input>

     Creates an input field.

     <keygen>

     The key generator creates the field.

     <link>

     Adds an external style sheet to the document.

     <meta>

     Contains additional information in the document.

     <param>

     Used to determine parameters.

     <source>

     Adds media element's resources.

     <track>

     Adds text tracks for media elements.

     <wbr>

     Breaks in specific places of sound.

<br> Element

The <br> element is used to show a part of a line to the next line or to pause between lines.

Example:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>HTML example</title>
  5. </head>
  6. <body>
  7.     <p>This is a paragraph <br> It will appear on the next line.</p>
  8. </body>
  9. </html>

 

Output:

This is a paragraph
It will appear on the next line.

 

<hr> element:

The <hr> element is used to separate the two sections.

Example:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>HTML element</title>
  5. </head>
  6. <body>
  7.     <h3>Document heading</h3>
  8.     <p>This is a paragraph</p>
  9.     <hr>
  10.     <h3>Document heading</h3>
  11.     <p>This is a paragraph</p>
  12. </body>
  13. </html>

 

Output:

Document heading
This is a paragraph


Document heading
This is a paragraph

Visit our HTML tags reference section to learn about all tags, including empt tags.

Tag: HTML empty element,html area tag, html base tag, html br tag, html col tag, html embed tag, html hr tag, html img tag, html input tag, html keygen tag, html link tag, html meta tag, html param tag, html source tag, track, html wbr tag, html br Element, html hr Element, HTML Single tag, html empty elements list, html empty element space, html empty elements examples

Thank You: