What Are HTML Tags/Elements?

By: Dusty Arlia
Published on July 19, 2012
Last Updated on Friday, July 17, 2015 at 11:32 PM
Total Updates: 7

HTML tags, also called HTML elements, are commands enclosed in angle brackets (< and >). 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: </p>.

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" />

Since images do not have content other than just the path to the image, the image tag (<img … />) is self-closing.

HTML tags in general are the "markup" part of the Hypertext Markup Language. The latest version of HTML is HTML5.

Comments:

Ad:

Ad: