In HTML, elements are the building blocks of a web page. An element is a set of opening and closing tags that surround content, and it can include attributes that provide additional information. HTML includes headings, paragraphs, lists, links, images, tables, and forms.
Here’s a list of some common HTML elements and their tags:
- Headings: Headings are used to create different levels of headings on a web page. The heading tags are h1, h2, h3, h4, h5, and h6, where h1 represents the main heading and h6 represents the minor heading.
- Paragraphs: Paragraphs define a section of text on a web page. The paragraph tag is “p“.
- Lists: Lists are used to create ordered or unordered lists on a web page. The requested list tag is “ol,” and the unordered list tag is “ul.” The list items are defined using the “li” tag.
- Links: Links are used to create hyperlinks that take the user to another web page or a different section of the same web page. The link tag is “a“.
- Images: Images are used to display pictures on a web page. The image tag is “img“.
- Tables: Tables are used to organize data into rows and columns. The table tag is “table,” the table row tag is “tr,” the table data tag is “td,” and the table header tag is “th.”
- Forms: Forms are used to gather data from users. The form tag is “form,” the input tag is “input,” the label tag is “label,” the select tag is “select,” and the option tag is “option.”
These are just a few examples of the elements and tags in HTML. By understanding these essential elements and tags, you can start building simple web pages and gradually expand your knowledge as you become more familiar with HTML.