How To Access HTML5 data- Attributes With JavaScript/JQuery

In HTML5 data- Attributes were introduced. They are a big improvement, because they allow you to store information within a HTML tag. They look like this:

<div id="abc" data-listsize="20"></div>

You see, the div tag is extended by a data-listsize attribute, which has the value 20. But how can you access this attributes with JavaScript? In this article I’ll show you both ways – with plain JavaScript and with jQuery.

Read more

3 Great HTML5 Attributes That Simplify Coding

HTML5 offers a lot of new features, which were, in my opinion, long overdue. In this article i will show you three great new HTML5 attributes which will make coding your HTML5 Website easier.

placeholder-Attribute

Do you know this placeholder texts within form fields like e.g. “Enter your email adress here”? Well with HTML5 you can add placeholders quite easily to your form fields. Just add the placeholder attribute to your form tag. No Javascript or other hacks needed anymore.

Read more