empty elements in html you must know

the empty elements are:
Empty HTML elements refer to elements that do not have any content or closing tag. 
These elements are also called void elements or self-closing elements. 
Examples of empty HTML elements include the <br> and <hr> tags, which are used to create line breaks and horizontal lines, respectively. 
Empty elements can be written as either <element> or <element />, with the latter being more commonly used in XHTML and XML documents.

Examples of empty HTML elements include:

<br>: creates a line break
<hr>: creates a horizontal line
<img>: displays an image
<input>: creates an input field for user input
<link>: creates a link to an external resource
<meta>: provides metadata about the document
<source>: specifies the source of a video or audio element
<wbr>: indicates a possible line break opportunity
Note that these elements are written as self-closing tags, like <br />, <hr />, <img src="image.jpg" />, <input type="text" />, <link href="styles.css" rel="stylesheet" />, <meta name="description" content="A website about cats" />, <source src="video.mp4" type="video/mp4" />, <wbr />.

the common and most used empty elements are

<area>
<base>
<br>
<col>
<embed>
<hr>
<img>
<input>
<keygen>
<link>
<meta>
<param>
<source>
<track>
<wbr>



No comments:

Post a Comment