HTML Syntax

HTML Syntax

HTML Syntax

  • HTML syntax is in the form of Tags that describe the content in the document to make the Website.

  • HTML provides thousands of tags to define different types of content in HTML document.


There are two types of tags in HTML.

1. Two-Sided tag

Two-sided tags are those tag which has an Opening and a Closing tag to enclose the content inside it.

Example:
<i>This text is in Italic style.</i>
Run Code »
Example Explanation:

In the above, we have shown an example of Two-Sided tag.

<i> Opening Tag
</i> Closing Tag

To make the text italic, we have to add the text in between the opening tag <i> and the closing tag </i>.
In the same way, if we want to change the color, size, weight, text decoration and other styles, only need to add text in between those tags.

Run the code to see the effect.

Note: Forgetting the closing tag can create unexpected results or errors.




2. One-Sided tag

One-sided tags are those tag which has only Closing tag.

Example:
<i> This is text1. <br/> This is text2.</i>
Run Code »
Example Explanation:

<br/> Closing Tag

<br/> is used to break the lines.

Run the code to see the effect.




HTML Syntax in Hindi


×

Course Menu