- Tags define elements in HTML (e.g.,
<p>for paragraph). - Attributes give extra information to tags (e.g.,
srcin<img>).
✔ Example:
<img src="photo.jpg" alt="Profile Photo" width="200">
<img>→ tagsrc,alt,width→ attributes
<p> for paragraph).src in <img>).✔ Example:
<img src="photo.jpg" alt="Profile Photo" width="200">
<img> → tagsrc, alt, width → attributes
Leave a Reply