Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Tags | Tags and Attributes
Ultimate HTML

TagsTags

HTML

HTML (Hyper Text Markup Language) is used for creating web documents. It defines rules for structuring text, adding images, and creating tables, forms, and lists. An HTML document is a text file with a .html extension that web browsers interpret to display a web page.

Tag

A tag is the fundamental building block of HTML. It represents an element or item within a web page, such as a heading, list, text paragraph, or image. Tags are differentiated from the regular text by using angle brackets. The tag name and any attributes are placed inside the angle brackets (<>).

For example, in the code snippet below, we have HTML elements written using opening and closing tags:

html

index.html

css

index.css

js

index.js

Code Description
This HTML code consists of three elements:
  • <section>: This represents a section element, which is typically used to group related content together;
  • <p>: This represents a paragraph element, which is used to define a block of text;
  • <button>: This represents a button element, which can be clicked to perform an action.
No worries, we will explore all these elements and more in detail in future chapters. This is just a simple example to get you started.

The opening tag (<tag_name>) signifies the start of an element, while the closing tag (</tag_name>) indicates its conclusion. We place the desired text between the opening and closing tags to include content within the element. You can run the code using the 'Run Code' button to see how the elements are rendered. The 'Reset' button clears the code input.

Comments

In HTML, comments can provide explanations or notes within the source code. They are written using the <!-- ... --> syntax. The browser will ignore anything written within these comment tags and will not be displayed on the webpage. With these adjustments, the text provides a concise and informative explanation of HTML concepts, an example code snippet, and a brief overview of comments.

html

index.html

css

index.css

js

index.js

1. How would you correctly wrap the "My first paragraph" text in an HTML `<p>` tag?
2. What syntax is used to leave a comment?

How would you correctly wrap the "My first paragraph" text in an HTML <p> tag?

Select the correct answer

What syntax is used to leave a comment?

Select the correct answer

Everything was clear?

Section 2. Chapter 2

TagsTags

HTML

HTML (Hyper Text Markup Language) is used for creating web documents. It defines rules for structuring text, adding images, and creating tables, forms, and lists. An HTML document is a text file with a .html extension that web browsers interpret to display a web page.

Tag

A tag is the fundamental building block of HTML. It represents an element or item within a web page, such as a heading, list, text paragraph, or image. Tags are differentiated from the regular text by using angle brackets. The tag name and any attributes are placed inside the angle brackets (<>).

For example, in the code snippet below, we have HTML elements written using opening and closing tags:

html

index.html

css

index.css

js

index.js

Code Description
This HTML code consists of three elements:
  • <section>: This represents a section element, which is typically used to group related content together;
  • <p>: This represents a paragraph element, which is used to define a block of text;
  • <button>: This represents a button element, which can be clicked to perform an action.
No worries, we will explore all these elements and more in detail in future chapters. This is just a simple example to get you started.

The opening tag (<tag_name>) signifies the start of an element, while the closing tag (</tag_name>) indicates its conclusion. We place the desired text between the opening and closing tags to include content within the element. You can run the code using the 'Run Code' button to see how the elements are rendered. The 'Reset' button clears the code input.

Comments

In HTML, comments can provide explanations or notes within the source code. They are written using the <!-- ... --> syntax. The browser will ignore anything written within these comment tags and will not be displayed on the webpage. With these adjustments, the text provides a concise and informative explanation of HTML concepts, an example code snippet, and a brief overview of comments.

html

index.html

css

index.css

js

index.js

1. How would you correctly wrap the "My first paragraph" text in an HTML `<p>` tag?
2. What syntax is used to leave a comment?

How would you correctly wrap the "My first paragraph" text in an HTML <p> tag?

Select the correct answer

What syntax is used to leave a comment?

Select the correct answer

Everything was clear?

Section 2. Chapter 2
some-alt