Brain Food for Web Developers

HTML5 Logo

November 14, 2013
by Graham
Comments Off on Custom Data Attributes in HTML5

Custom Data Attributes in HTML5

One of the new abilities of HTML5 is that it allows you to add a custom data attribute to your markup. This is useful for when you want to include some metadata in your markup.
The new data attribute look like this: data-file=”stylesheet1″
The attribute must be prefixed with “data-” and should be all lower case.
Read more for an example of the data attribute in action. Continue reading

HTML5 Logo

July 3, 2011
by Graham
Comments Off on Writing HTML5 Forms

Writing HTML5 Forms

Although HTML5 is becoming more popular with coders, there are still those who are hesitant about adopting the latest markup for fear of the lack of support from older browsers. Luckily, there are some cool new HTML5 form attributes that degrade gracefully in older browsers (even IE6!).

This summary of some new attributes will discuss HTML5 autofocus field, placeholder text, form validation as well as new input types (email, numbers, URL, etc.).

Continue reading