본문으로 건너뛰기

Key HTML Tags

Key HTML Tags

While there are over 100 different HTML tags, the key ones I've described previously are used most frequently.

  • <div>: Used to structure a webpage (Division), and group together subordinate elements.

  • <p>: Defines a paragraph (Paragraph) tag, consisting of a block of text.

  • <input>: Used to receive data input from the user.

  • <img>: Displays an image, with the src attribute specifying the path to the image file.

  • <a>: Defines a hyperlink (Hyperlink) for navigation to other web pages or specific sections.

  • <ul>: Defines an unordered list (Unordered List).

  • <li>: Constitutes list item content within an <ul> tag.


Additionally, tags that do not have a closing tag (</tag>) are called self-closing tags.

For example, the img and input tags are self-closing tags that do not contain subordinate content. They are used with a '/' at the end of the start tag, such as <img /> and <input />.

Example of input self-closing tag
<input type="text" placeholder="Enter name" />

The code above is an example of a text input field for the user's name, where you can see that the slash is attached after the start tag, as in placeholder="Enter name" />.