Skip to main content

Command Palette

Search for a command to run...

Tags, Elements, Comments and Attributes in HTML

Published
1 min read
S

I am a student and learning web development.

<Tags>,<>Content</>,<!-- -->,<img src=" "> in html

In HTML, tags are used to define the structure and layout of a webpage. They are the basing building blocks of the website. Tags in html are represented by <> and </>. <> is the opening tag and </> is the closing tag. Some of the tags in html is self-closing tag. In self closing tag their is not any closing tag. Example of self closing tags are <br>,<img>etc.

Elements are the individual components of an HTML document. <>Content</> this is called an Element in HTML.

Comments in html tells used the explanation about the code. For writing comments in the html jus enclose the text in <!-- --> or press ctrl+/(in windows).

Attributes are the additional property the tag. They are added to the opening tag of an element and they always come in the form of name-value pairs. For example, the src attribute is used to specify the source of an image, and the href attribute is used to specify the destination of a link.

V

I like it

1

More from this blog