Difference Between Elements and Tags
HTML elements with no content are called empty element is called tag .Empty elements do not have an end tag For example <br>
HTML Tags both start and end tags with content are called element .
For example <p> this is content</p>
Attribute is additional information about the html tags. Each attributes have the different information According to tag. All tags of html have different attributes. Attribute writes inside the tags and give the specific values . All attributes are made up of two parts one is name and second is value.
For example you see the below picture clearer all the concept about the attribute and element and tag
- All HTML elements can have attributes
- The title attribute provides additional “tool-tip” information
- The href attribute provides address information for links
- The width and height attributes provide size information for images
- The alt attribute provides text for screen readers
- we always use lowercase attribute names
- we always quote attribute values with double quotes