HTML 5

HTML 5 is the structure of our web pages. It is the markup that represents the DOM (document object model).

COURSES 1

WATCH Damon Bauer's COURSE

Create an SVG Icon System

Create an SVG Icon System

In this course, we will dive into a number of different ways we can create, optimize and integrate an SVG icon set. There are p...

11 lessons

Browse all HTML 5 lessons.

showing All 14 lessons...

Accessible Icon Buttons

Building Forms with Accessibility in Mind

Headings and semantic structure for accessible web pages

What is the Accessibility Tree?

Intro to ARIA

How Visible vs. Hidden Elements Affect Keyboard/Screen Reader Users

Accessible modal dialogs

Using the tabindex attribute for keyboard accessibility

Include an SVG with an Image Tag

P

Add an SVG as a Background Image

Add an SVG Sprite as a Background Image

P

Add an SVG as an Embedded Background Image

Load an External SVG Inside a “Use” Tag

P

Embed SVG Directly In Markup with the “Use” Tag

P
html5 tutorial about Accessible Icon Buttons

Accessible Icon Buttons

3:42 html5

Icon buttons are very common in web applications, yet they often have accessibility problems. Learn how to make your icon buttons accessible to keyboard and screen reader users with HTML, CSS, SVG and ARIA.

html5 tutorial about Building Forms with Accessibility in Mind

Building Forms with Accessibility in Mind

7:02 html5

Are you building a website or web application that takes user input? Then it's important for you to watch this demo. Learn how to create more accessible forms using basic HTML form labels, fieldsets and legends. You'll even learn a bit about what makes Safari's developer tools pretty awesome.

html5 tutorial about Headings and semantic structure for accessible web pages

Headings and semantic structure for accessible web pages

7:01 html5

Webpages are more than simply how they look. By coding with headings, landmarks and semantic HTML, you can expose a rich document outline to users of assistive technologies, as well as search engines.

html5 tutorial about What is the Accessibility Tree?

What is the Accessibility Tree?

4:29 html5

Coding for accessibility? You should get familiar with the accessibility tree, a structure produced by platform Accessibility APIs running parallel to the DOM, which exposes accessibility information to assistive technologies such as screen readers. There are multiple tools for visualizing this tree; in this lesson we'll look at Chrome and Microsoft Edge. For more on Accessibility APIs, refer to this amazing article by Leonie Watson. For a how-to on setting up the Chrome Accessibility Inspector, visit bit.ly/chrome-a11y.

html5 tutorial about Intro to ARIA

Intro to ARIA

8:09 html5

What is this thing called ARIA? In this lesson, you'll learn about about WAI-ARIA, a.k.a. Accessible Rich Internet Applications, the W3C spec for specifying accessibility information in HTML and SVG. I cover the basics of applying ARIA roles, states and properties, helpful information for creators of user-interface widgets and component libraries. But it's important to note that you might not need ARIA at all! Before using it, it's important to educate yourself on what ARIA does and doesn't do for you.

html5 tutorial about How Visible vs. Hidden Elements Affect Keyboard/Screen Reader Users

How Visible vs. Hidden Elements Affect Keyboard/Screen Reader Users

12:24 html5

There are many techniques for hiding content in user interfaces, and not all are created equal! Learn how different hiding techniques in HTML, CSS and ARIA impact keyboard and screen reader users in addition to visual display. As a bonus, we'll also take a look using a screen reader on a mobile device.

html5 tutorial about Accessible modal dialogs

Accessible modal dialogs

11:41 html5

Learn how to create a modal dialog with accessible keyboard and screen reader mechanics using the native HTML5 dialog element and experimental inert attribute (with polyfills) and JavaScript focus management. We'll explore how to make a DIV or non-modal dialog into a modal one to contrast the differences. Finally, we'll expose accessibility information for NVDA, Voiceover, JAWS and other screen readers.

For more details on creating accessible dialog content, check out this great article by Marco Zehe, Advanced ARIA Tip #2: Accessible Modal Dialogs: https://www.marcozehe.de/2015/02/05/advanced-aria-tip-2-accessible-modal-dialogs/

Used in this lesson:

html5 tutorial about Using the tabindex attribute for keyboard accessibility

Using the tabindex attribute for keyboard accessibility

5:09 html5

You can make any element keyboard interactive with the HTML tabindex attribute. But you might need a little extra JavaScript and ARIA to support keyboards and screen readers. For more on using tabindex in practice, check out my focus management lesson.

html5 tutorial about Include an SVG with an Image Tag

Include an SVG with an Image Tag

1:06 html5 PRO

Since an SVG is really just an image, it can be included on a page just like any other image, using an img tag. This is simple to implement, easy to resize and has the benefit of being cacheable.

There are a couple downsides to this approach, however. You can’t modify the SVG attributes such as fill or stroke; once the icon is included, there isn’t much you can do to change its appearance. Also, each icon you include creates an HTTP request, potentially impacting page load speed.

If you’re looking for an easy way to implement just a couple of icons that don’t need to change, this is a viable option.

html5 tutorial about Add an SVG as a Background Image

Add an SVG as a Background Image

1:32 html5

Learn how to set an SVG as the background image of an element. Background images can be resized by changing the width and height of the element containing background image, so it’s easy to create multiple sizes of the same icon.

However, each background image creates an HTTP request, so be aware of your page load speed. With this approach, you are unable to change attributes on the SVG such as fill or stroke.

If you want the ability to display icons at different sizes and don’t need to change their appearance or their interaction styles (such as on :hover), this could be a good option for you.

html5 tutorial about Add an SVG Sprite as a Background Image

Add an SVG Sprite as a Background Image

4:11 html5 PRO

Learn how to use an SVG sprite to display your icons. Sprites are great because they add only a single HTTP request, are easy to add to markup and can be sized easily with the help of the background-size property.

This is a good option if you know the icons aren’t going to change much and you don’t mind manually editing the SVG sprite.

However, adding/editing icons once a sprite is created is cumbersome to do by hand, because you have to know the size and position of each icon and modify accordingly.

html5 tutorial about Add an SVG as an Embedded Background Image

Add an SVG as an Embedded Background Image

2:52 html5

Learn how to set an elements background image to embedded SVG. This method has an added benefit of not incurring any HTTP requests, as the SVG is simply embedded into the CSS. They can also be resized by changing the width and height of the element containing background image, so it’s easy to create multiple sizes of the same icon using this approach.

If you’re looking for the ability to display icons at different sizes and want to modify the SVG interaction styles (such as on :hover), this is could be a good option. One negative to adding the interaction styles is that it requires you to duplicate selectors and the SVG markup; the more icons you have, the larger your stylesheets will become.

html5 tutorial about Load an External SVG Inside a “Use” Tag

Load an External SVG Inside a “Use” Tag

1:38 html5 PRO

Learn how to load a single SVG icon set from an external URL in order to take advantage of caching. This has the added benefit of not needing to include the same chunk of SVG on every page where icons are displayed. Since it’s the same resource being requested for each icon, the browser can cache the file as well.

Note: The SVG must be hosted on the same domain as the requested page.

Some older/less feature complete browsers don’t support this functionality. If you only care about the latest browsers, you can get away with not using a JavaScript polyfill (but you should still provide some sort of fallback). However, the svgxuse polyfill can help provide a cross browser experience, with the added necessity of a JavaScript dependency.

html5 tutorial about Embed SVG Directly In Markup with the “Use” Tag

Embed SVG Directly In Markup with the “Use” Tag

1:49 html5 PRO

In this lesson, we’ll learn how to embed an SVG sprite into markup and reference it throughout the page using the SVG “use” tag and fragment identifiers.

This has become the standard way of displaying SVG icons because of the ability to dynamically style individual parts (especially interaction states). Also, because the SVG is just markup embedded on the page, it creates no extra HTTP requests. However, the block of SVG needs repeating on every page where icons are used.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?