by UDEMIE
Similar to keywords, HTML tags specify how a web browser will format and present content. With the help of tags, a web browser can distinguish between HTML content and simple text. HTML tags contain three main parts: opening tag, content, and closing tag. However, some HTML tags are self-closing, meaning they do not need a closing tag. You’ll meet these soon. 🙂
When a web browser reads an HTML document, it processes the content from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tag has different properties, which we will discuss later on.
What is an HTML Tag Synopsis.
Structure of an HTML Tag
An HTML tag typically consists of:
- Opening Tag: This tag starts the element and encloses the content. It is written with the tag name inside angle brackets. Example:
<p>
- Content: The content is the information that lies between the opening and closing tags. It is what the browser displays on the web page. Example:
<p>This is a paragraph.</p>
- Closing Tag: This tag ends the element and is similar to the opening tag, but it includes a forward slash before the tag name. Example:
</p>
Self-Closing Tags
Some HTML tags do not require a closing tag and are known as self-closing tags. These tags represent empty elements and are written with a slash at the end of the opening tag.
Examples:
<img src="image.jpg" alt="An image">
<br>
<hr>
These are just a few examples. There are many more HTML tags that you will encounter as you delve deeper into HTML.
READ: THE ULTIMATE ESSENTIALS
Read What is an HTML Tag? online
You can use the link below to read What is an HTML Tag? online