HTML5 Removed Attributes

HTML5 removed all presentation attribue, we can add style using css. Here is a list of removed attribues in html5

Removed Attributes in HTML5
type ( From Unordered List, link and script tag)

HTML5 New Attributes

HTML5 introduced some new attributes. All these attributes are functional and easy to use. Here is a list of html5 attributes.

New Attributes in HTML5

Attribute Description Example

async Attribute

to load external js asynchronously. Improve Page performance.

Don't use async in external jquery files.

<script async src="file.js"> </script>


to edit paragraphs or text.

This para id editable.

data Attribute

to add custom attributes in html5. <div data-timer="3000" > </div>

datetime Attribute

to set datetime value of time tag in ISO Format. <time datetime="1947-08-15T00:00">15-Aug</time>

download Attribute

to dowload a file, instead of open in same tab <a href="html5.pdf" download>Download PDF</a>

draggable = "true" or "false"

to specify element is draggable or not.

This para id draggable.

hidden Attribute

to hide an element from user. <button hidden >Button</button>

list Attribute

to add datalist with input element.
<input type="text" list="list1">
<datalist id="list1"> 
<option> Value 1</option> 
<option> Value 2</option> 
<option> Value 3</option> 

max Attribute

to set maximun value of number and range <input type="number" max="60">

min Attribute

to set minimum value of number and range <input type="number" min="18">

minlength Attribute

to set minimum length of value <input type="text" minlength="3">

open Attribute

to open details element in html5. <details open > </details>

Role Attribute

to create customise attributes in html5 <form role="search"> </form>
<div role="button"> </div>