What are the different elements of HTML?

The different elements of HTML are:

1. Headings: These are used to define the headings of a document or section. Example:

This is a Heading

2. Paragraphs: These are used to define a paragraph in a document. Example:

This is a paragraph.

3. Links: These are used to link to other webpages or documents. Example: This is a link.

4. Images: These are used to add images to a webpage. Example: Image

5. Lists: These are used to create lists of items. Example:

  • Item 1
  • Item 2
  • Item 3

6. Tables: These are used to create tables of data. Example:

Header 1 Header 2
Row 1, Column 1 Row 1, Column 2
Row 2, Column 1 Row 2, Column 2

7. Forms: These are used to create forms to collect user input. Example:

What are the main elements of an HTML document?

The main elements of an HTML document are the following:

1. – This is the first element of an HTML document and it is used to declare the document type.

Example:

2. – This element is used to define the root of an HTML document.

Example:

3. – This element contains the document’s metadata and is used to provide information about the document.

Example:

4. – This element is used to define the title of the document. </p> <p>Example: <title>My Web Page

5. – This element contains all the content of the document.

Example:

6.

– This element is used to define a heading.

Example:

Welcome to my website!

7.

– This element is used to define a paragraph.

Example:

This is my website.

8. – This element is used to define a link.

Example: Visit my website

9. – This element is used to define an image.

Example: My Image

10. – This element is used to define a script.

Example: