Module 10 of 11

Modern HTML Features

Lessons

About This Module

Many interface patterns that once needed a JavaScript library are now built into HTML itself. Pop-up windows, small overlays and expandable sections can be created with a few native elements and attributes, and the browser takes care of focus, keyboard support and accessibility for you. Using them means less code to write, less to maintain, and fewer things that can break.

This module starts with the dialog element for building modal windows. It then covers the popover attribute, which turns any element into an overlay that opens from a button. Next you'll learn details and summary for content that expands and collapses, and how to group them into a native accordion where only one section is open at a time.

Watch the lessons in order, then continue on to Performance & Best Practices.

Lessons

4 videos
01

Create a Modal Dialog Natively in the Browser

Shows how the dialog element lets you display a modal box without installing an extra JavaScript library.

02

HTML Popover Without JavaScript

Covers the popover attribute, the popovertarget attribute on a button, and the auto and manual popover types.

03

How to Use the Details and Summary Tags

Introduces details and summary for building an accordion-style interface without custom JavaScript, CSS and HTML.

04

Native Exclusive Accordions with Details

Builds a native accordion where one item opens at a time, then styles it with CSS, all without JavaScript.