HTML elements, tags and attributes
What is the difference between HTML elements and tags? <p> is a tag and </p> is a tag too. The first is a start tag and the second is an end tag.
On the other hand, the following line is an element:
<p>This is a great day</p>
It includes the start and end tags, as well as the content.
This is another element:
<div><p>This is a great day</p></div>
An attribute is a property of an element. It is written inside the start tag in the following form:
For example the src attribute points to a file’s name and location, in the form of a URL:
<img src="images/flower.gif" />