Tags vs Elements, Attributes, Entities in HTML:

Tags vs Elements, Attributes, Entities in HTML:

HTML Tags: Tags work as an identifier for a Browser which identifies the content, which has been written inside tags. They begin with < symbol and end with > symbol. There are two types of tags used in HTML. (1) <> </> : open tag, close tag (2) </> : self closing tag.

HTML Elements: It is a combination of tags with content. Example: <p>This is the paragraph tag </p> Here, <p> is a starting tag and </p> is an ending tag.

HTML Attributes: It is additional properties of the tag which make them easy to work. Example: <img src =" " alt = " " /> Here, src and alt are attributes.

HTML Entities: some characters are reserved in HTML. If we use less than (>) or greater than (<) in our content, the Browser might mix the tags. Here comes the role of entities, the entities are used to display the reserved character in HTML. An entity used like this, &entity_name; or &#entity_number; To display a less than sign (<) we can write: &lt or &#60.