HTML tags and elements
What are Elements and Tags?
In the world of HTML, "elements" and "tags" are terms that are often used interchangeably, but have slightly different meanings.
Tags: are the labels you use to start and end an element. They are like assembly instructions that tell the browser how to display the content. A tag always comes in angle brackets, such as <tag>
for the beginning and </tag>
for the end.
Elements: An element is everything between the opening and closing tags, including the tags themselves. For example, in <p>This is a paragraph</p>
, the entire string is a paragraph element.
Header tags: Headings in HTML are like the titles and subtitles of a newspaper. They help to organise the content and give an idea of what the section below is about. There are 6 levels of headings, with <h1>
being the largest and most important, and <h6>
the smallest and least important.
For instance,
Help us improve the content 🤩
You can leave comments here.
Last updated