Major HTML Tags
There are over 100 HTML tags, but the most frequently used ones are listed below.
-
<div>: Defines a division or a section in an HTML document, often used to group block-elements and configure the layout of the webpage -
<p>: Defines a paragraph of text -
<input>: Used to receive data input from the user -
<img>: Used to display images, specified with the src attribute -
<a>: Defines a hyperlink to another webpage or a specific section within the same page -
<ul>: Defines an unordered list -
<li>: Defines a list item, typically used within<ul>or<ol>
Single tags, also referred to as self-closing tags, do not have a closing tag (</tag>).
For example, img and input tags are self-closing tags as they do not enclose any content, and are written with a slash (/) at the end, like <img /> and <input />.
<input type="text" placeholder="Enter name" />
The above code is an example of a text input field for receiving the user's name. Notice the self-closing slash placeholder="Enter name" /> at the end of the tag.
Practice
Follow the highlighted parts of the code to practice entering it yourself.