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

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?

question-icon

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

Select the correct answer

question-icon

What syntax is used to leave a comment?

Select the correct answer

Everything was clear?

Section 2. Chapter 2