HTML5 Attributes

HTML5 Attributes

HTML5 elements can contain attributes and gets added to an HTML start tag. HTML5 Attributes are used to set properties of a specific element.

If you have an idea about name-value pairs, then it would be easier for you to understand how to work with attributes. Here’s an example,


  • HTML_Tag is the HTML tag i.e. element, for example <img>, <div>, <h1>
  • HTML_Attribute is the attribute, which provides value, for example, id, class, href, etc.

Some of the examples are given below,

As you can see above, href is our attribute for the element a. The href attribute provides the URL.

Another example,

As you can see above, src is our attribute for the element img. The src attribute specifies the URL of the image.

HTML5 Introduction
HTML5 Features
Studyopedia Editorial Staff
Studyopedia Editorial Staff

We work to create free tutorials for all.

No Comments

Post A Comment