Vipindas.in

Some of the attributes I liked in HTML5

July 17, 2013 · HTML, CSS, JS, Technology

Reduces N number of javascripts and CSS with the below cool attributes in HTML5

  • placeholder :- lets you add a hint inside the textfield, but where the hint automatically disappears when you click inside it. 

  • pattern :- lets you specify a regular expression (in JavaScript RegEx format) for legal values

  • required :- it specifies that an input field must be filled out before submitting the form.

  • autofocus :- element should automatically get focus when the page loads.

  • list :- refers to a element that contains pre-defined options for an element.

  • hidden :- it specifies that an element is not yet, or is no longer, relevant.

  • contenteditable :- specifies whether the content of an element is editable or not.

  • async :- can be used along with script. allows you to run the script asynchronously as soon as it is available

More details can be found in the below links

http://www.w3schools.com/html/html5\_form\_attributes.asp
http://www.w3schools.com/tags/att\_global\_hidden.asp