3. Define HTML tags, and list down at least 10 HTML tags.
Answers
An HTML tag is commonly defined as a set of characters constituting a formatted command for a Web page. At the core of HTML, tags provide the directions or recipes for the visual content that one sees on the Web.
Your First 10 HTML Tags
- <html> … </html> — The root element.
- <head> … </head> — The document head.
- <title> … </title> — The page title.
- <body> … </body> — The page's content.
- <h1> … </h1> — A section heading.
- <p> … </p> — A paragraph.
- <a> … </a> — A link.
- <img> — An image. The img element lets you insert images into your web pages.
- <div> … </div> — A block-level container for content
- <span> … </span> — An inline container for content
Answer:
An HTML element is a type of HTML document component, one of several types of HTML nodes. HTML document is composed of a tree of simple HTML nodes, such as text nodes, and HTML elements, which add semantics and formatting to parts of document. Each element can have HTML attributes specified.
Explanation:
1. <html> … </html> — The root element
2. <head> … </head> — The document head
3. <title> … </title> — The page title
4. <body> … </body> — The page’s content
5. <h1> … </h1> — A section heading
6. <p> … </p> — A paragraph
7. <a> … </a> — A link
8. <img> — An image
9. <div> … </div> — A block-level container for content
10. <span> … </span> — An inline container for content