Eric Eggert, outline
Proper structure …
“Sir Tim Berners-Lee” by Paul Clarke — Own work. Licensed under CC BY-SA 4.0 via Wikimedia Commons.
Web browsers can read HTML files and render them into visible or audible web pages. Browsers do not display the HTML tags and scripts, but use them to interpret the content of the page. HTML describes the structure of a website semantically along with cues for presentation, making it a markup language, rather than a programming language.
<!DOCTYPE html> <!-- document type -->
<html lang="en"> <!-- root element w/ language -->
<head>
<meta charset="UTF-8"> <!-- character set -->
<title>My awesome website</title> <!-- title -->
</head>
<body>
… <!-- actual content of the page -->
</body>
</html>
<header>
elementbanner
, if not inside of <article>
or <section>
<header>
<img src="/images/logo.png" alt="SpaceBear Inc.">
</header>
… defines a way to make Web content and Web applications more accessible to people with disabilities. It especially helps with dynamic content and advanced user interface controls developed with Ajax, HTML, JavaScript, and related technologies.
… helps to tell the browser what he has to tell the Accessibility APIs of the OS.
Example 1: The <aside>
element has a default role of complementary
.
Example 2: The <div aria-label="Sidebar" role="complementary">
has an accessible name of Sidebar and a role of complementary
.
<footer>
elementcontentinfo
, if not inside of <article>
or <section>
<footer>
<p>© 2014 SpaceBears Inc.</p>
</footer>
<nav>
elementnavigation
<nav aria-label="Main Navigation">
…
</nav>
…
<nav aria-labelledby="quicknav-heading">
<h5 id="quicknav-heading">
Quick Navigation
</h5>
…
</nav>
<main>
elementmain
<main>
<h1>Stellar launch weekend for the SpaceBear 7!</h1>
…
</main>
<aside>
elementcomplementary
<aside>
<h3>Related Articles</h3>
…
</aside>
search
<form action="…">
<div role="search">
<input type="search" aria-label="Search">
<button type="submit">Search</button>
</div>
</form>
<section>
elementregion
<section>
<h2>Chapter 2</h2>
…
</section>
<article>
elementarticle
<article>
<h2>Space Bear Classic</h2>
…
</article>
<article>
<h2>Space Bear Extrem</h2>
…
</article>
<h1>An inside look at the new SpaceBear 8™</h1>
<h2>Cotton Fur</h2>
<h2>Sapphire Eyes</h2>
<h2>Synthetic Felt Paws</h2>
<h1>SpaceTeddy Inc.</h1>
<h2>Navigation</h2>
<h2>Sidebar</h2>
<h3>More news</h3>
<h3>What our clients say</h3>
<h3>Ratings</h3>
<h2>An inside look at the new SpaceBear 8™</h2>
<h3>Cotton Fur</h3>
<h3>Saphire Eyes</h3>
<h3>Syntetic Felt Paws</h3>
<h2>Footer</h2>
<h3>About the company</h3>
<h3>Our retail stores</h3>
<h2>Navigation</h2>
<h2>Sidebar</h2>
<h3>More news</h3>
<h3>What our clients say</h3>
<h3>Ratings</h3>
<h1>An inside look at the new SpaceBear 8™</h1>
<h2>Cotton Fur</h2>
<h2>Saphire Eyes</h2>
<h2>Syntetic Felt Paws</h2>
<h2>Footer</h2>
<h3>About the company</h3>
<h3>Our retail stores</h3>
Add rhythm and lightness to content using paragraph element (<p>). Consistent styling of paragraphs improves text readability. Paragraph styling can be altered by applying user stylesheets that adapt for specific needs.
<ul>
<li>Corn</li>
<li>Tomatoes</li>
<li>Beans</li>
<li>Onions</li>
<li>Garlic</li>
…
</ul>
<ol>
<li>Cook beans for 45 minutes.</li>
<li>Cut vegetables in small cubes.</li>
<li>Sauté onions and garlic.</li>
<li>Deglaze using the tomatoes.</li>
<li>Add corn and beans.</li>
</ol>
<ol>
<li>Prepare ingredients
<ul>
<li>Cook beans for 45 minutes.</li>
<li>Cut vegetables in small cubes.</li>
</ul>
</li>
<li>Sauté onions and garlic.</li>
<li>Deglaze using the tomatoes.</li>
<li>Add corn and beans.</li>
</ol>
This is a blockquote! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
This is some text and then there is an inline quote
from a famous person.
<blockquote>
<p>…</p><p>…</p>
</blockquote>
<p>This is some text and then there is
<q>an inline quote</q> from a famous person.</p>
Figures associate captions with lists, images, tables, and other content. For example an annual report could reference to a diagram containing the sales volumes of a product. Related content is wrapped in a <figure> element, a <figcaption> element is added to describe the content.
<figure role="group" aria-labelledby="fig-t3-capt">
<figcaption id="fig-t3-capt">G3: SpaceBear sales volume
</figcaption>
<img src="…"
alt="SpaceBear sales diagram,
showing the huge success in Q4"
longdesc="…">
<a href="…">Long Description</a>
</figure>
em
, rem
or %
units<mark>
element to semantically highlight textid
attributes to elements or headings on the pageWe will talk about navigation on Friday…