HTML5 Attribute Tutorial: Learn HTML5 Attribute basic concept, Different Type of HTML5 Attribute, HTML5 Attribute Reference Guide, Know what are HTML5 Attributes, HTML5 Attribute Examples. In this page to learn the HTML5 Attribute definition, the Purpose of using HTML5 Attribute, and how to use HTML5 Attribute on a web page with examples. Follow and Like us on Facebook, Twitter, LinkedIn, Pinterest for the latest posts.
What’s an attribute in HTML5?
HTML Attributes – An HTML attribute is an additional behavior or property of an element. It is specified within an element like title attribute, language attribute, Href attribute, etc.
Example: <a href=”https://www.webdesignreference.com/” title=”home-link”>This is a home page link</a>. Here “Href” and “title” are additional behaviour of an element.
There are some common Attribute in HTML5:
- Class: It is used for defining class of an element.
- Id: It specifies id or name of an element.
- Style: this behaviour is used for styling of an element.
- Title: It is used for title or tooltip of an element.
- Alt: It is used for alternate text of an image.
- Src: This is used for source path of an image.
- value: It specifies the value of an element.
- Href: It specifies the link url.
There are some new Attribute for form in HTML5 :
- autocomplete:
Example of Autocomplete attribute in html5:
<form action=”submit-page.html” autocomplete=”on”> First name:<input type=”text” name=”first-name”><br> Last name: <input type=”text” name=”last-name”><br> E-mail: <input type=”email” name=”email” autocomplete=”on”><br> <input type=”submit” class=”submit-button”> </form>
- novalidate:
Example of Novalidate attribute in html5:
<form action=”submit-page.html” novalidate> E-mail: <input type=”email” name=”email” autocomplete=”on”><br> <input type=”submit” class=”submit-button”> </form>
There are some new commonly used Attribute for Input type in HTML5:
- Autocomplete
- Autofocus
- Height
- Width
- placeholder
- required
Web Design Reference Guide Android App for Website Developers
Web Design Reference Guide Android App: Web Design Tutorial App is a tutorial and reference-based app. It provides Web Design Tutorial and Reference to Web Designers or Web Developers to grow their Web Development skills.
Also Related to This Page
- HTML5 Attribute Tutorial and HTML5 Attribute Reference
- HTML5 Doctype Tutorial and HTML5 Doctype Reference
- HTML5 Examples – HTML5 Tutorial Examples, HTML5 Reference Examples
- HTML5 Graphics Tutorial and HTML5 Graphics Reference
- HTML5 Media Tutorial and HTML5 Media Reference
- HTML5 Tags Tutorial and HTML5 Tags Reference