Skip to content

Instantly share code, notes, and snippets.

@kaseybon
Last active January 31, 2019 14:45
Show Gist options
  • Save kaseybon/b393960125c67625fb1b962e7d657185 to your computer and use it in GitHub Desktop.
Save kaseybon/b393960125c67625fb1b962e7d657185 to your computer and use it in GitHub Desktop.
Examples of good and bad markup.
<p>The <abbr title="Described and Captioned Media Program">DCMP</abbr> provides services designed to support and improve the academic achievement of students who are blind, visually impaired, deaf, hard of hearing, or deaf-blind.</p>
<!-- Good Code -->
<h1>About DCMP</h1>
<h2>About the Described and Captioned Media Program</h2>
<h2>About the U.S. Department of Education</h2>
<!-- Bad Code -->
<h1>About DCMP</h1>
<h3>About the Described and Captioned Media Program</h3>
<h3>About the U.S. Department of Education</h3>
<!-- Define languages at the top of the page -->
<html lang="en">
<!-- Define languages in the content -->
<h2 class="video-title">Around The Universe: <span lang="es">Invernaderus</span> (Spanish)</h2>
<!-- Correct Markup -->
<button class="button">Open Preferences</button>
<!-- Incorrect Markup -->
<div class="button">Open Preferences</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment