What Are HTML Tags/Elements?
HTML tags, also called HTML elements, are commands enclosed in angle brackets (
>). These commands make up the structure of a webpage. HTML tags describe the contents they encapsulate. For example, you encapsulate a title/heading in a
<h1> tag. While you would enclose an image in a self-closing
<img … /> tag. The tags tell the browser how its encapsulated contents should be rendered. When the browser's rendering engine encounters these tags, it knows what to do with their contents.
Most HTML tags come in pairs. The opening tag of each pair tells the browser where the instruction begins, while the closing tag tells the browser where the instruction ends. Each closing tag should include a forward slash (
/). Here's an example of an opening tag:
<p>. And here's an example of a closing tag:
Certain HTML tags however are self-closing. A self-closing HTML tag is a single html tag that is both the opening and closing HTML tag in one. Here's an example of a self-closing HTML tag:
<img src="images/example_picture.jpg" />
HTML tags in general are the "markup" part of the Hypertext Markup Language. The latest version of HTML is HTML5.