HTML Tutorial #3: HTML Empty tags

In the previous tutorial we have read about heading tags and some more tags further we will know Empty tag.

What is empty tag?


=> In HTML which does not have a closing tag(</br>) are called empty element. So it does not contain content in between. Also it can be called self-closing tag(<br/>).


The empty elements in HTML are as following :



<area> area inside an image map <area/>
<base> base URL/target (inside <head>)  <base/>
<br> break <br/>
<col> column <col/>
<embed> embedding external <embed/>
<hr> horizontal <hr/>
<img> image <img/>
<input> input field <input/>
<link> linking <link/>
<meta> page content <meta/>
<param> pass the parameters <param/>
<sourse> multimedia resourses <sourse/>
<track> track for media elements <track/>
<wbr> to break lines <wbr/>


When you type in your Notepad editor:

<!DOCTYPE html>
<html>
<head>
<title>Tags</title>
</head>
<body>
<p> HTML empty <br/> tag </p>
</body>
</html> 




It will show like this. All of them will work same as <br/>. Basically empty elements must not have end tag in  HTML.


In the next we will see how to create a table in HTML document.





Comments