In html we need to know about tags and attributes. In this page we are going to see about the HTML tags and attributes.
What is HTML tag
HTML tags defines how the web browser must format and display the content.
Usually HTML tags contain start tag and end tag.
But some HTML tags doesn't have end tag, they are
We will see about the tags deeply in the upcoming tutorials.
Difference between a HTML tag and HTML element
HTML tags denotes only the opening and closing entities.
HTML elements denotes the opening and closing entities as well as the contents present inside it.
What is HTML tag Attributes
HTML tag can have attributes.
An attribute cannot be repeated again in the same tag.
Attributes usually changes the way, a browser interpret the tags.
Attributes are written within the start tag.
Also we can create an user defined attributes. As per HTML standards, user defined attributes start with data-*.
* - denotes the user defined text.
Example - Title Attribute
In the above example title is the attribute name and This is the paragraph is the value.
When mouse is moved over the content (I am inside the paragraph tag), the title value (This is the paragraph) is displayed as tooltip.