In HTML, tags are commonly defined as a set of characters constituting a formatted command for a web page. They are used for making elements for the web page’s markup. During the early days of the World Wide Web, tags were responsible for a majority of the web’s code.
<element-name> content </element-name> <self-closing-element-tag />
A single tag is made of an opening angle bracket
<, followed by the
element-name, followed by the closing angle bracket. While most elements are made of opening and closing tags but some are self-closing. Furthermore, some self-closing elements like
<br> can have a slash at the end like so:
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
Learn HTML on Codecademy
Front-End EngineerFront-end engineers work closely with designers to make websites beautiful, functional, and fast.
Includes 34 Courses
With Professional Certification