The HTML specification got a major overhaul a couple of weeks ago when W3C published its new HTML 5.1 recommendation in November 2016. In its recent blog post, W3C called the new major release the gold standard, as HTML 5.1 provide us with new ways of how we can use HTML to create more flexible web experiences.
If you carefully plan the structure of your HTML documents, you can help computers make sense of the…Read more
Note that currently not all browsers support all of these features, so don’t forget to check browser support before you use them in production. If you are interested in the further development of the HTML standard, you can check out the working draft of HTML 5.2 as well.
Recommended Reading: A Look Into: ARIA Web Standards & HTML Apps Accessibility
In HTML 5.1, you can use
tag together with the
srcset attribute to make responsive image selection possible. The
tag represents an image container that allows developers to declare different image resources in order to adapt to the UA‘s viewport size, screen pixel density, screen type, and other parameters used in responsive design.
tag itself doesn’t display anything, it functions merely as context for the multiple image resources. You need to declare the default image resource as the value of the
src attribute of the
tag, and the alternative image resources go within the
srcset attributes of the
tags, you can add extended information to a content piece. The extra information isn’t shown by default, but if users are interested, they have the option to take a look. In your code, you are supposed to place the
. After the
tag you can add the extra information you want to hide.
We couldn't finish downloading this video.
- File name:
- File size:
- 100 MB
This is how this code example looks like in Firefox 50.0.2: