Tags in HTML

In HTML (Hypertext Markup Language), a "tag" refers to the element used to define the structure and content of a webpage. HTML tags are enclosed in angle brackets (< >) and typically consist of a start tag, content, and an end tag.

There are three core building block of html document tags, attribute and elements.

In HTML, tags are like keywords which defines the structure of webpage. Every tag in HTML perform different tasks. Tags are enclosed in angle brackets <>

Html core building block

Tags in HTML serve different purposes such as defining headings, paragraphs, links, images, lists, tables, forms, and more.

Types of Tag in Html

There are many types of tags in HTML, each with a specific purpose. Here are some of the most common types of HTML tags:

  1. Structural Tags: These are the most basic HTML tags and are used to define the overall structure of a web page. Examples include <html>, <head>, <title> and <body>.
  2. Text Formatting Tags: These are used to change the appearance of text on a web page. Examples include <b> (bold), <i> (italic), <u> (underline).
  3. Link Tags: These are used to create hyperlinks to other web pages, email addresses, or files. Examples include <a> (anchor) and <link>.
  4. Image Tags: These are used to insert images into a web page. Examples include <img> and <figure>.
  5. List Tags: These are used to create ordered or unordered lists. Examples include <ol> (ordered list), <ul> (unordered list), and <li> (list item).
  6. Table Tags: These are used to create tables on a web page. Examples include <table>, <tr> (table row), <th> (table header), and <td> (table data).
  7. Form Tags: These are used to create interactive forms that allow users to enter data. Examples include <form>, <input>, and <select>.
  8. Semantic Tags: These are used to provide additional meaning to the content on a web page, making it more accessible and easier to understand for search engines and assistive technologies. Examples include <header>, <footer>, <nav>, <article>, and <section>.
Some HTML tags are not closed, for example hr and br.

These are just a few examples of the many types of tags available in HTML. Each type of tag serves a specific purpose and can be combined in various ways to create rich and dynamic web pages.

Next Article ❯