dev-notes/languages/html/html.html

5795 lines
No EOL
168 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="author" content="Marcello Lamonaca">
<link rel="canonical" href="http://m-lamonaca.github.io/dev-notes/languages/html/html.html">
<link rel="prev" href="../../databases/mongo-db.html">
<link rel="next" href="../markdown.html">
<link rel="icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.34">
<title>HTML - Dev Notes</title>
<link rel="stylesheet" href="../../assets/stylesheets/main.35f28582.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.06af60db.min.css">
<script src="https://unpkg.com/iframe-worker/shim"></script>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
<meta property="og:type" content="website" >
<meta property="og:title" content="HTML - Dev Notes" >
<meta property="og:description" content="None" >
<meta property="og:image" content="http://m-lamonaca.github.io/dev-notes/assets/images/social/languages/html/html.png" >
<meta property="og:image:type" content="image/png" >
<meta property="og:image:width" content="1200" >
<meta property="og:image:height" content="630" >
<meta property="og:url" content="http://m-lamonaca.github.io/dev-notes/languages/html/html.html" >
<meta name="twitter:card" content="summary_large_image" >
<meta name="twitter:title" content="HTML - Dev Notes" >
<meta name="twitter:description" content="None" >
<meta name="twitter:image" content="http://m-lamonaca.github.io/dev-notes/assets/images/social/languages/html/html.png" >
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="orange" data-md-color-accent="deep-orange">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#html" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow md-header--lifted" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../index.html" title="Dev Notes" class="md-header__button md-logo" aria-label="Dev Notes" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6m80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3l89.3 89.4-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3"/></svg>
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Dev Notes
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
HTML
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="orange" data-md-color-accent="deep-orange" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="orange" data-md-color-accent="deep-orange" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/m-lamonaca/dev-notes" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</nav>
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item">
<a href="../../index.html" class="md-tabs__link">
Home
</a>
</li>
<li class="md-tabs__item">
<a href="../../containers/docker.html" class="md-tabs__link">
Containers
</a>
</li>
<li class="md-tabs__item">
<a href="../../databases/redis.html" class="md-tabs__link">
Databases
</a>
</li>
<li class="md-tabs__item md-tabs__item--active">
<a href="html.html" class="md-tabs__link">
Languages
</a>
</li>
<li class="md-tabs__item">
<a href="../../misc/git.html" class="md-tabs__link">
Misc
</a>
</li>
<li class="md-tabs__item">
<a href="../../linux/filesystem/file-links.html" class="md-tabs__link">
Linux
</a>
</li>
</ul>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../index.html" title="Dev Notes" class="md-nav__button md-logo" aria-label="Dev Notes" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6m80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3l89.3 89.4-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3"/></svg>
</a>
Dev Notes
</label>
<div class="md-nav__source">
<a href="https://github.com/m-lamonaca/dev-notes" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../index.html" class="md-nav__link">
<span class="md-ellipsis">
Home
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
Containers
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Containers
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../containers/docker.html" class="md-nav__link">
<span class="md-ellipsis">
Docker
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../containers/kubernetes.html" class="md-nav__link">
<span class="md-ellipsis">
Kubernetes
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
<span class="md-ellipsis">
Databases
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Databases
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../databases/redis.html" class="md-nav__link">
<span class="md-ellipsis">
Redis
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../databases/sql.html" class="md-nav__link">
<span class="md-ellipsis">
SQL
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../databases/mongo-db.html" class="md-nav__link">
<span class="md-ellipsis">
MongoDB
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" checked>
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="">
<span class="md-ellipsis">
Languages
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Languages
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
HTML
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="html.html" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
HTML
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#terminology" class="md-nav__link">
<span class="md-ellipsis">
Terminology
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#anatomy-of-an-html-element" class="md-nav__link">
<span class="md-ellipsis">
Anatomy of an HTML Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#the-doctype" class="md-nav__link">
<span class="md-ellipsis">
The Doctype
</span>
</a>
<nav class="md-nav" aria-label="The Doctype">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#xhtml-10-strict" class="md-nav__link">
<span class="md-ellipsis">
XHTML 1.0 Strict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#html4-transitional" class="md-nav__link">
<span class="md-ellipsis">
HTML4 Transitional
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#html5" class="md-nav__link">
<span class="md-ellipsis">
HTML5
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#the-html-element" class="md-nav__link">
<span class="md-ellipsis">
The HTML Element
</span>
</a>
<nav class="md-nav" aria-label="The HTML Element">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#the-head-element" class="md-nav__link">
<span class="md-ellipsis">
The HEAD Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#html-shiv-polyfill" class="md-nav__link">
<span class="md-ellipsis">
HTML Shiv (Polyfill)
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#the-body-element" class="md-nav__link">
<span class="md-ellipsis">
The BODY Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#javascript" class="md-nav__link">
<span class="md-ellipsis">
JavaScript
</span>
</a>
<nav class="md-nav" aria-label="JavaScript">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#local-remote-or-inline-javascript" class="md-nav__link">
<span class="md-ellipsis">
Local, Remote or Inline JavaScript
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#forms" class="md-nav__link">
<span class="md-ellipsis">
Forms
</span>
</a>
<nav class="md-nav" aria-label="Forms">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#form-validation" class="md-nav__link">
<span class="md-ellipsis">
Form Validation
</span>
</a>
<nav class="md-nav" aria-label="Form Validation">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#front-end-validation" class="md-nav__link">
<span class="md-ellipsis">
Front-End Validation
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#back-end-validation" class="md-nav__link">
<span class="md-ellipsis">
Back-End Validation
</span>
</a>
<nav class="md-nav" aria-label="Back-End Validation">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#built-in-validation" class="md-nav__link">
<span class="md-ellipsis">
Built-In Validation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#validation-with-javascript" class="md-nav__link">
<span class="md-ellipsis">
Validation with JavaScript
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#general-structure-of-html-page" class="md-nav__link">
<span class="md-ellipsis">
General structure of HTML page
</span>
</a>
<nav class="md-nav" aria-label="General structure of HTML page">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#meta-tag-structure" class="md-nav__link">
<span class="md-ellipsis">
Meta Tag Structure
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#paragraph" class="md-nav__link">
<span class="md-ellipsis">
Paragraph
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#headings" class="md-nav__link">
<span class="md-ellipsis">
Headings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#formatted-text" class="md-nav__link">
<span class="md-ellipsis">
Formatted Text
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#elements" class="md-nav__link">
<span class="md-ellipsis">
Elements
</span>
</a>
<nav class="md-nav" aria-label="Elements">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#linksanchor" class="md-nav__link">
<span class="md-ellipsis">
Links/Anchor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#images" class="md-nav__link">
<span class="md-ellipsis">
Images
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unordered-list-bullet-list" class="md-nav__link">
<span class="md-ellipsis">
Unordered list (bullet list)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ordered-list-numbered-list" class="md-nav__link">
<span class="md-ellipsis">
Ordered list (numbered list)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#description-list-list-of-terms-and-descriptions" class="md-nav__link">
<span class="md-ellipsis">
Description list (list of terms and descriptions)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#tables" class="md-nav__link">
<span class="md-ellipsis">
Tables
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#character-codes" class="md-nav__link">
<span class="md-ellipsis">
Character Codes
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#block-element" class="md-nav__link">
<span class="md-ellipsis">
Block Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#inline-element" class="md-nav__link">
<span class="md-ellipsis">
Inline Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#html5-new-tags" class="md-nav__link">
<span class="md-ellipsis">
HTML5 new tags
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#html-forms-inputs" class="md-nav__link">
<span class="md-ellipsis">
HTML Forms &amp; Inputs
</span>
</a>
<nav class="md-nav" aria-label="HTML Forms & Inputs">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#basic-form-elements" class="md-nav__link">
<span class="md-ellipsis">
Basic Form Elements
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#text-field" class="md-nav__link">
<span class="md-ellipsis">
Text Field
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#password-field" class="md-nav__link">
<span class="md-ellipsis">
Password Field
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#radio-buttons" class="md-nav__link">
<span class="md-ellipsis">
Radio Buttons
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#checkboxes" class="md-nav__link">
<span class="md-ellipsis">
Checkboxes
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#dropdown-menus" class="md-nav__link">
<span class="md-ellipsis">
Dropdown Menus
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#file-select" class="md-nav__link">
<span class="md-ellipsis">
File Select
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#text-area" class="md-nav__link">
<span class="md-ellipsis">
Text Area
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#submit-reset" class="md-nav__link">
<span class="md-ellipsis">
Submit &amp; Reset
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#button" class="md-nav__link">
<span class="md-ellipsis">
Button
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#fieldset" class="md-nav__link">
<span class="md-ellipsis">
Fieldset
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#email-field" class="md-nav__link">
<span class="md-ellipsis">
Email Field
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#progress-bar" class="md-nav__link">
<span class="md-ellipsis">
Progress Bar
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#slider" class="md-nav__link">
<span class="md-ellipsis">
Slider
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#meter" class="md-nav__link">
<span class="md-ellipsis">
Meter
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#datalist-autocomplete" class="md-nav__link">
<span class="md-ellipsis">
Datalist (Autocomplete)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#more-input-types" class="md-nav__link">
<span class="md-ellipsis">
More Input Types
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#using-built-in-form-validation" class="md-nav__link">
<span class="md-ellipsis">
Using Built-In Form Validation
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../markdown.html" class="md-nav__link">
<span class="md-ellipsis">
Markdown
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../css/css.html" class="md-nav__link">
<span class="md-ellipsis">
CSS
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../c/c.html" class="md-nav__link">
<span class="md-ellipsis">
C
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../kotlin/kotlin.html" class="md-nav__link">
<span class="md-ellipsis">
Kotlin
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../swift/swift.html" class="md-nav__link">
<span class="md-ellipsis">
Swift
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_7" >
<label class="md-nav__link" for="__nav_4_7" id="__nav_4_7_label" tabindex="">
<span class="md-ellipsis">
Assembly
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_7">
<span class="md-nav__icon md-icon"></span>
Assembly
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../assembly/intel.html" class="md-nav__link">
<span class="md-ellipsis">
Intel
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../assembly/riscv.html" class="md-nav__link">
<span class="md-ellipsis">
RISC-V
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_8" >
<label class="md-nav__link" for="__nav_4_8" id="__nav_4_8_label" tabindex="">
<span class="md-ellipsis">
Python
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_8_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_8">
<span class="md-nav__icon md-icon"></span>
Python
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../python/python.html" class="md-nav__link">
<span class="md-ellipsis">
Python
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_8_2" >
<label class="md-nav__link" for="__nav_4_8_2" id="__nav_4_8_2_label" tabindex="0">
<span class="md-ellipsis">
Modules
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_8_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_8_2">
<span class="md-nav__icon md-icon"></span>
Modules
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../python/modules/argparse.html" class="md-nav__link">
<span class="md-ellipsis">
argparse
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/collections.html" class="md-nav__link">
<span class="md-ellipsis">
collection
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/csv.html" class="md-nav__link">
<span class="md-ellipsis">
csv
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/ftplib.html" class="md-nav__link">
<span class="md-ellipsis">
ftplib
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/itertools.html" class="md-nav__link">
<span class="md-ellipsis">
itertools
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/json.html" class="md-nav__link">
<span class="md-ellipsis">
json
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/logging.html" class="md-nav__link">
<span class="md-ellipsis">
logging
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/shutil.html" class="md-nav__link">
<span class="md-ellipsis">
shutil
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/smtplib.html" class="md-nav__link">
<span class="md-ellipsis">
smtplib
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/socket.html" class="md-nav__link">
<span class="md-ellipsis">
socket
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/sqlite.html" class="md-nav__link">
<span class="md-ellipsis">
sqlite
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/time-datetime.html" class="md-nav__link">
<span class="md-ellipsis">
time & datetime
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/modules/unittest.html" class="md-nav__link">
<span class="md-ellipsis">
unittest
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_8_3" >
<label class="md-nav__link" for="__nav_4_8_3" id="__nav_4_8_3_label" tabindex="0">
<span class="md-ellipsis">
Libraries
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_8_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_8_3">
<span class="md-nav__icon md-icon"></span>
Libraries
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../python/libs/tkinter.html" class="md-nav__link">
<span class="md-ellipsis">
TKinter
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/libs/numpy.html" class="md-nav__link">
<span class="md-ellipsis">
Numpy
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/libs/pandas.html" class="md-nav__link">
<span class="md-ellipsis">
Pandas
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/libs/seaborn.html" class="md-nav__link">
<span class="md-ellipsis">
Seaborn
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/libs/requests.html" class="md-nav__link">
<span class="md-ellipsis">
Requests
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../python/libs/beautiful-soup.html" class="md-nav__link">
<span class="md-ellipsis">
Beatiful Soup
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_9" >
<label class="md-nav__link" for="__nav_4_9" id="__nav_4_9_label" tabindex="">
<span class="md-ellipsis">
.NET
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_9_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_9">
<span class="md-nav__icon md-icon"></span>
.NET
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_9_1" >
<label class="md-nav__link" for="__nav_4_9_1" id="__nav_4_9_1_label" tabindex="0">
<span class="md-ellipsis">
C#
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_9_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_9_1">
<span class="md-nav__icon md-icon"></span>
C#
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../dotnet/csharp/csharp.html" class="md-nav__link">
<span class="md-ellipsis">
C#
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/csharp/linq.html" class="md-nav__link">
<span class="md-ellipsis">
Linq
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/csharp/collections.html" class="md-nav__link">
<span class="md-ellipsis">
Collections
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/csharp/reactive-extensions.html" class="md-nav__link">
<span class="md-ellipsis">
Reactive Extensions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/csharp/async-programming.html" class="md-nav__link">
<span class="md-ellipsis">
Async Programming
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/csharp/unit-tests.html" class="md-nav__link">
<span class="md-ellipsis">
Unit Tests
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_9_2" >
<label class="md-nav__link" for="__nav_4_9_2" id="__nav_4_9_2_label" tabindex="0">
<span class="md-ellipsis">
ASP.NET
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_9_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_9_2">
<span class="md-nav__icon md-icon"></span>
ASP.NET
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../dotnet/asp.net/minimal-api.html" class="md-nav__link">
<span class="md-ellipsis">
Minimal API
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/asp.net/filters.html" class="md-nav__link">
<span class="md-ellipsis">
FIlters
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/asp.net/middleware.html" class="md-nav__link">
<span class="md-ellipsis">
Middleware
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/asp.net/razor-syntax.html" class="md-nav__link">
<span class="md-ellipsis">
Razor Syntax
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/asp.net/blazor.html" class="md-nav__link">
<span class="md-ellipsis">
Blazor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/asp.net/signalr.html" class="md-nav__link">
<span class="md-ellipsis">
SignalR
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/asp.net/web-forms.html" class="md-nav__link">
<span class="md-ellipsis">
Web Forms
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_9_3" >
<label class="md-nav__link" for="__nav_4_9_3" id="__nav_4_9_3_label" tabindex="0">
<span class="md-ellipsis">
Database
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_9_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_9_3">
<span class="md-nav__icon md-icon"></span>
Database
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../dotnet/database/ado.net.html" class="md-nav__link">
<span class="md-ellipsis">
ADO.NET
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../dotnet/database/entity-framework.html" class="md-nav__link">
<span class="md-ellipsis">
Entity Framework
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_10" >
<label class="md-nav__link" for="__nav_4_10" id="__nav_4_10_label" tabindex="">
<span class="md-ellipsis">
Java
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_10_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_10">
<span class="md-nav__icon md-icon"></span>
Java
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../java/java.html" class="md-nav__link">
<span class="md-ellipsis">
Java
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../java/java-collection-framework.html" class="md-nav__link">
<span class="md-ellipsis">
Java Collection Framework
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../java/dao.html" class="md-nav__link">
<span class="md-ellipsis">
DAO
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_10_4" >
<label class="md-nav__link" for="__nav_4_10_4" id="__nav_4_10_4_label" tabindex="0">
<span class="md-ellipsis">
Web
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_10_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_10_4">
<span class="md-nav__icon md-icon"></span>
Web
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../java/web/servlet.html" class="md-nav__link">
<span class="md-ellipsis">
Serverlet
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_10_4_2" >
<label class="md-nav__link" for="__nav_4_10_4_2" id="__nav_4_10_4_2_label" tabindex="0">
<span class="md-ellipsis">
Spring
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_4_10_4_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_10_4_2">
<span class="md-nav__icon md-icon"></span>
Spring
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../java/spring/pom.xml.html" class="md-nav__link">
<span class="md-ellipsis">
POM
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../java/spring/spring-project.html" class="md-nav__link">
<span class="md-ellipsis">
Project Structure
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_11" >
<label class="md-nav__link" for="__nav_4_11" id="__nav_4_11_label" tabindex="">
<span class="md-ellipsis">
PHP
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_11_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_11">
<span class="md-nav__icon md-icon"></span>
PHP
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../php/php.html" class="md-nav__link">
<span class="md-ellipsis">
PHP
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../php/database.html" class="md-nav__link">
<span class="md-ellipsis">
Database
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../php/web.html" class="md-nav__link">
<span class="md-ellipsis">
Web
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../php/dependency-injection.html" class="md-nav__link">
<span class="md-ellipsis">
Dependency Injection
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../php/unit-tests.html" class="md-nav__link">
<span class="md-ellipsis">
Unit Tests
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../php/composer.html" class="md-nav__link">
<span class="md-ellipsis">
Composer
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../php/psr-7.html" class="md-nav__link">
<span class="md-ellipsis">
PSR 7
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../php/plates-templating.html" class="md-nav__link">
<span class="md-ellipsis">
Plates
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_11_9" >
<label class="md-nav__link" for="__nav_4_11_9" id="__nav_4_11_9_label" tabindex="0">
<span class="md-ellipsis">
Simple MVC
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_11_9_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_11_9">
<span class="md-nav__icon md-icon"></span>
Simple MVC
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../php/simple-mvc/simple-mvc.html" class="md-nav__link">
<span class="md-ellipsis">
Simple MVC
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../php/simple-mvc/rest-api.html" class="md-nav__link">
<span class="md-ellipsis">
REST API
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_12" >
<label class="md-nav__link" for="__nav_4_12" id="__nav_4_12_label" tabindex="">
<span class="md-ellipsis">
Rust
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_12_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_12">
<span class="md-nav__icon md-icon"></span>
Rust
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../rust/rust.html" class="md-nav__link">
<span class="md-ellipsis">
Rust
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../rust/macros.html" class="md-nav__link">
<span class="md-ellipsis">
Macros
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../rust/cargo.html" class="md-nav__link">
<span class="md-ellipsis">
Cargo
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../rust/concurrency.html" class="md-nav__link">
<span class="md-ellipsis">
Concurrency
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../rust/unit-tests.html" class="md-nav__link">
<span class="md-ellipsis">
Unit Tests
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_13" >
<label class="md-nav__link" for="__nav_4_13" id="__nav_4_13_label" tabindex="">
<span class="md-ellipsis">
Javascript
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_13_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_13">
<span class="md-nav__icon md-icon"></span>
Javascript
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../javascript/javascript.html" class="md-nav__link">
<span class="md-ellipsis">
Javascript
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../javascript/dom.html" class="md-nav__link">
<span class="md-ellipsis">
DOM
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../javascript/events-animation.html" class="md-nav__link">
<span class="md-ellipsis">
Events & Animation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../javascript/ajax.html" class="md-nav__link">
<span class="md-ellipsis">
AJAX
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../javascript/jquery.html" class="md-nav__link">
<span class="md-ellipsis">
jQuery
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_13_6" >
<label class="md-nav__link" for="__nav_4_13_6" id="__nav_4_13_6_label" tabindex="0">
<span class="md-ellipsis">
React
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_13_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_13_6">
<span class="md-nav__icon md-icon"></span>
React
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../javascript/react/react.html" class="md-nav__link">
<span class="md-ellipsis">
React
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../javascript/react/react-router.html" class="md-nav__link">
<span class="md-ellipsis">
React Router
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../javascript/react/react-tests.html" class="md-nav__link">
<span class="md-ellipsis">
React Tests
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../javascript/react/redux.html" class="md-nav__link">
<span class="md-ellipsis">
Redux
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../javascript/react/redux-tests.html" class="md-nav__link">
<span class="md-ellipsis">
Redux Tests
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../javascript/svelte/svelte.html" class="md-nav__link">
<span class="md-ellipsis">
Svelte
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_14" >
<label class="md-nav__link" for="__nav_4_14" id="__nav_4_14_label" tabindex="">
<span class="md-ellipsis">
PowerShell
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_14_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_14">
<span class="md-nav__icon md-icon"></span>
PowerShell
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../powershell/scripting.html" class="md-nav__link">
<span class="md-ellipsis">
Scripting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../powershell/commands.html" class="md-nav__link">
<span class="md-ellipsis">
Commands
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_15" >
<label class="md-nav__link" for="__nav_4_15" id="__nav_4_15_label" tabindex="">
<span class="md-ellipsis">
Bash
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_15_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_15">
<span class="md-nav__icon md-icon"></span>
Bash
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../bash/scripting.html" class="md-nav__link">
<span class="md-ellipsis">
Scripting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../bash/commands.html" class="md-nav__link">
<span class="md-ellipsis">
Commands
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-ellipsis">
Misc
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Misc
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../misc/git.html" class="md-nav__link">
<span class="md-ellipsis">
Git
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../misc/graph-ql.html" class="md-nav__link">
<span class="md-ellipsis">
GraphQL
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../misc/regular-expressions.html" class="md-nav__link">
<span class="md-ellipsis">
RegEx
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../misc/ssh.html" class="md-nav__link">
<span class="md-ellipsis">
SSH
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../misc/web-components.html" class="md-nav__link">
<span class="md-ellipsis">
WebComponents
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
<span class="md-ellipsis">
Linux
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6">
<span class="md-nav__icon md-icon"></span>
Linux
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_1" >
<label class="md-nav__link" for="__nav_6_1" id="__nav_6_1_label" tabindex="0">
<span class="md-ellipsis">
Filesystem
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6_1">
<span class="md-nav__icon md-icon"></span>
Filesystem
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../linux/filesystem/file-links.html" class="md-nav__link">
<span class="md-ellipsis">
File Links
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../linux/filesystem/procfs.html" class="md-nav__link">
<span class="md-ellipsis">
/proc
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../linux/filesystem/sysfs.html" class="md-nav__link">
<span class="md-ellipsis">
/sys
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_2" >
<label class="md-nav__link" for="__nav_6_2" id="__nav_6_2_label" tabindex="0">
<span class="md-ellipsis">
System Init
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_6_2">
<span class="md-nav__icon md-icon"></span>
System Init
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../linux/init/systemd.html" class="md-nav__link">
<span class="md-ellipsis">
Systemd
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../linux/init/open-rc.html" class="md-nav__link">
<span class="md-ellipsis">
OpenRC
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#terminology" class="md-nav__link">
<span class="md-ellipsis">
Terminology
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#anatomy-of-an-html-element" class="md-nav__link">
<span class="md-ellipsis">
Anatomy of an HTML Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#the-doctype" class="md-nav__link">
<span class="md-ellipsis">
The Doctype
</span>
</a>
<nav class="md-nav" aria-label="The Doctype">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#xhtml-10-strict" class="md-nav__link">
<span class="md-ellipsis">
XHTML 1.0 Strict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#html4-transitional" class="md-nav__link">
<span class="md-ellipsis">
HTML4 Transitional
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#html5" class="md-nav__link">
<span class="md-ellipsis">
HTML5
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#the-html-element" class="md-nav__link">
<span class="md-ellipsis">
The HTML Element
</span>
</a>
<nav class="md-nav" aria-label="The HTML Element">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#the-head-element" class="md-nav__link">
<span class="md-ellipsis">
The HEAD Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#html-shiv-polyfill" class="md-nav__link">
<span class="md-ellipsis">
HTML Shiv (Polyfill)
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#the-body-element" class="md-nav__link">
<span class="md-ellipsis">
The BODY Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#javascript" class="md-nav__link">
<span class="md-ellipsis">
JavaScript
</span>
</a>
<nav class="md-nav" aria-label="JavaScript">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#local-remote-or-inline-javascript" class="md-nav__link">
<span class="md-ellipsis">
Local, Remote or Inline JavaScript
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#forms" class="md-nav__link">
<span class="md-ellipsis">
Forms
</span>
</a>
<nav class="md-nav" aria-label="Forms">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#form-validation" class="md-nav__link">
<span class="md-ellipsis">
Form Validation
</span>
</a>
<nav class="md-nav" aria-label="Form Validation">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#front-end-validation" class="md-nav__link">
<span class="md-ellipsis">
Front-End Validation
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#back-end-validation" class="md-nav__link">
<span class="md-ellipsis">
Back-End Validation
</span>
</a>
<nav class="md-nav" aria-label="Back-End Validation">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#built-in-validation" class="md-nav__link">
<span class="md-ellipsis">
Built-In Validation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#validation-with-javascript" class="md-nav__link">
<span class="md-ellipsis">
Validation with JavaScript
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#general-structure-of-html-page" class="md-nav__link">
<span class="md-ellipsis">
General structure of HTML page
</span>
</a>
<nav class="md-nav" aria-label="General structure of HTML page">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#meta-tag-structure" class="md-nav__link">
<span class="md-ellipsis">
Meta Tag Structure
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#paragraph" class="md-nav__link">
<span class="md-ellipsis">
Paragraph
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#headings" class="md-nav__link">
<span class="md-ellipsis">
Headings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#formatted-text" class="md-nav__link">
<span class="md-ellipsis">
Formatted Text
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#elements" class="md-nav__link">
<span class="md-ellipsis">
Elements
</span>
</a>
<nav class="md-nav" aria-label="Elements">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#linksanchor" class="md-nav__link">
<span class="md-ellipsis">
Links/Anchor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#images" class="md-nav__link">
<span class="md-ellipsis">
Images
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unordered-list-bullet-list" class="md-nav__link">
<span class="md-ellipsis">
Unordered list (bullet list)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ordered-list-numbered-list" class="md-nav__link">
<span class="md-ellipsis">
Ordered list (numbered list)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#description-list-list-of-terms-and-descriptions" class="md-nav__link">
<span class="md-ellipsis">
Description list (list of terms and descriptions)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#tables" class="md-nav__link">
<span class="md-ellipsis">
Tables
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#character-codes" class="md-nav__link">
<span class="md-ellipsis">
Character Codes
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#block-element" class="md-nav__link">
<span class="md-ellipsis">
Block Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#inline-element" class="md-nav__link">
<span class="md-ellipsis">
Inline Element
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#html5-new-tags" class="md-nav__link">
<span class="md-ellipsis">
HTML5 new tags
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#html-forms-inputs" class="md-nav__link">
<span class="md-ellipsis">
HTML Forms &amp; Inputs
</span>
</a>
<nav class="md-nav" aria-label="HTML Forms & Inputs">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#basic-form-elements" class="md-nav__link">
<span class="md-ellipsis">
Basic Form Elements
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#text-field" class="md-nav__link">
<span class="md-ellipsis">
Text Field
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#password-field" class="md-nav__link">
<span class="md-ellipsis">
Password Field
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#radio-buttons" class="md-nav__link">
<span class="md-ellipsis">
Radio Buttons
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#checkboxes" class="md-nav__link">
<span class="md-ellipsis">
Checkboxes
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#dropdown-menus" class="md-nav__link">
<span class="md-ellipsis">
Dropdown Menus
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#file-select" class="md-nav__link">
<span class="md-ellipsis">
File Select
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#text-area" class="md-nav__link">
<span class="md-ellipsis">
Text Area
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#submit-reset" class="md-nav__link">
<span class="md-ellipsis">
Submit &amp; Reset
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#button" class="md-nav__link">
<span class="md-ellipsis">
Button
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#fieldset" class="md-nav__link">
<span class="md-ellipsis">
Fieldset
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#email-field" class="md-nav__link">
<span class="md-ellipsis">
Email Field
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#progress-bar" class="md-nav__link">
<span class="md-ellipsis">
Progress Bar
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#slider" class="md-nav__link">
<span class="md-ellipsis">
Slider
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#meter" class="md-nav__link">
<span class="md-ellipsis">
Meter
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#datalist-autocomplete" class="md-nav__link">
<span class="md-ellipsis">
Datalist (Autocomplete)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#more-input-types" class="md-nav__link">
<span class="md-ellipsis">
More Input Types
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#using-built-in-form-validation" class="md-nav__link">
<span class="md-ellipsis">
Using Built-In Form Validation
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="html">HTML</h1>
<h2 id="terminology">Terminology</h2>
<p><strong>Web design</strong>: The process of planning, structuring and creating a website.<br />
<strong>Web development</strong>: The process of programming dynamic web applications.<br />
<strong>Front end</strong>: The outwardly visible elements of a website or application.<br />
<strong>Back end</strong>: The inner workings and functionality of a website or application.</p>
<h2 id="anatomy-of-an-html-element">Anatomy of an HTML Element</h2>
<p><strong>Element</strong>: Building blocks of web pages, an individual component of HTML.<br />
<strong>Tag</strong>: Opening tag marks the beginning of an element &amp; closing tag marks the end.
Tags contain characters that indicate the tag's purpose content.</p>
<p><code>&lt;tagname&gt; content &lt;/tagname&gt;</code> </p>
<p><strong>Container Element</strong>: An element that can contain other elements or content.<br />
<strong>Stand Alone Element</strong>: An element that cannot contain anything else.<br />
<strong>Attribute</strong>: Provides additional information about the HTML element. Placed inside an opening tag, before the right angle bracket.<br />
<strong>Value</strong>: Value is the value assigned to a given attribute. Values must be contained inside quotation marks (“”).</p>
<h2 id="the-doctype">The Doctype</h2>
<p>The first thing on an HTML page is the doctype, which tells the browser which version of the markup language the page is using.</p>
<h3 id="xhtml-10-strict">XHTML 1.0 Strict</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="cp">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;</span>
<a id="__codelineno-0-2" name="__codelineno-0-2"></a><span class="cp"> &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="html4-transitional">HTML4 Transitional</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-1-1">1</a></span>
<span class="normal"><a href="#__codelineno-1-2">2</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1"></a><span class="cp">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;</span>
<a id="__codelineno-1-2" name="__codelineno-1-2"></a><span class="cp"> &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="html5">HTML5</h3>
<p><code>&lt;!doctype html&gt;</code></p>
<h2 id="the-html-element">The HTML Element</h2>
<p>After <code>&lt;doctype&gt;</code>, the page content must be contained between tags.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-2-1">1</a></span>
<span class="normal"><a href="#__codelineno-2-2">2</a></span>
<span class="normal"><a href="#__codelineno-2-3">3</a></span>
<span class="normal"><a href="#__codelineno-2-4">4</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1"></a><span class="cp">&lt;!doctype html&gt;</span>
<a id="__codelineno-2-2" name="__codelineno-2-2"></a><span class="p">&lt;</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">&quot;en&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-2-3" name="__codelineno-2-3"></a> <span class="cm">&lt;!-- page contents --&gt;</span>
<a id="__codelineno-2-4" name="__codelineno-2-4"></a><span class="p">&lt;/</span><span class="nt">html</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="the-head-element">The HEAD Element</h3>
<p>The head contains the title of the page &amp; meta information about the page. Meta information is not visible to the user, but has many purposes, like providing information to search engines.<br />
UTF-8 is a character encoding capable of encoding all possible characters, or code points, defined by Unicode. The encoding is variable-length and uses 8-bit code units.</p>
<p>XHTML and HTML4: <code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;/meta&gt;</code></p>
<p>HTML5: <code>&lt;meta charset="utf-8"&gt;</code></p>
<h3 id="html-shiv-polyfill">HTML Shiv (Polyfill)</h3>
<p>Used to make old browsers understand newer HTML5 and newer components.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-3-1">1</a></span>
<span class="normal"><a href="#__codelineno-3-2">2</a></span>
<span class="normal"><a href="#__codelineno-3-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1"></a><span class="cm">&lt;!--[if lt IE 9]&gt;</span>
<a id="__codelineno-3-2" name="__codelineno-3-2"></a><span class="cm"> &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js&quot;&gt;&lt;/script&gt;</span>
<a id="__codelineno-3-3" name="__codelineno-3-3"></a><span class="cm">&lt;![endif]--&gt;</span>
</code></pre></div></td></tr></table></div>
<h2 id="the-body-element">The BODY Element</h2>
<p>The body contains the actual content of the page. Everything that is contained in the body is visible to the user.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-4-1">1</a></span>
<span class="normal"><a href="#__codelineno-4-2">2</a></span>
<span class="normal"><a href="#__codelineno-4-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1"></a><span class="p">&lt;</span><span class="nt">body</span><span class="p">&gt;</span>
<a id="__codelineno-4-2" name="__codelineno-4-2"></a> <span class="cm">&lt;!-- page contents --&gt;</span>
<a id="__codelineno-4-3" name="__codelineno-4-3"></a><span class="p">&lt;/</span><span class="nt">body</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h2 id="javascript">JavaScript</h2>
<p>XHTML and older: <code>&lt;script src="js/scripts.js" type="text/javascript"&gt;&lt;/script&gt;</code><br />
HTML5: <code>&lt;script src="js/scripts.js"&gt;&lt;/script&gt;</code> (HTML5 spec states that <code>type</code> attribute is redundant and should be omitted)<br />
The <code>&lt;script&gt;</code> tag is used to define a client-side script (JavaScript).<br />
The <code>&lt;script&gt;</code> element either contains scripting statements, or it points to an external script file through the src attribute.</p>
<h3 id="local-remote-or-inline-javascript">Local, Remote or Inline JavaScript</h3>
<p><strong>Remote</strong>: <code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;</code><br />
<strong>Local</strong>: <code>&lt;script src="js/main.js"&gt;&lt;/script&gt;</code><br />
<strong>Inline</strong>: <code>&lt;script&gt; javascript-code-here &lt;/script&gt;</code></p>
<h2 id="forms">Forms</h2>
<p>Forms allow to collect data from the user:</p>
<ul>
<li>signing up and logging in to websites</li>
<li>entering personal information</li>
<li>filtering content (using dropdowns, checkboxes)</li>
<li>performing a search</li>
<li>uploading files</li>
</ul>
<p>Forms contain elements called controls (text inputs, checkboxes, radio buttons, submit buttons).<br />
When users complete a form the data is usually submitted to a web server for processing. </p>
<h3 id="form-validation"><a href="https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation">Form Validation</a></h3>
<p>Validation is a mechanism to ensure the correctness of user input.</p>
<p>Uses of Validation:</p>
<ul>
<li>Make sure that all required information has been entered</li>
<li>Limit the information to certain types (e.g. only numbers)</li>
<li>Make sure that the information follows a standard (e.g. email, credit card number)</li>
<li>Limit the information to a certain length</li>
<li>Other validation required by the application or the back-end services</li>
</ul>
<h4 id="front-end-validation">Front-End Validation</h4>
<p>The application should validate all information to make sure that it is complete, free of errors and conforms to the specifications required by the back-end.<br />
It should contain mechanisms to warn users if input is not complete or correct.<br />
It should avoid to send "bad" data to the back-end. </p>
<h3 id="back-end-validation">Back-End Validation</h3>
<p>It should never trust that the front-end has done validation since some clever users can bypass the front-end mechanisms easily.<br />
Back-end services can receive data from other services, not necessarily front-end, that don't perform validation. </p>
<h4 id="built-in-validation">Built-In Validation</h4>
<p>Not all browsers validate in the same way and some follow the specs partially. Some browsers don't have validation at all (older desktop browsers, some mobile browsers).<br />
Apart from declaring validation intention with HTML5 developers don't have much control over what the browser actually does.<br />
Before using build-in validation make sure that it's supported by the target browsers.</p>
<h4 id="validation-with-javascript">Validation with JavaScript</h4>
<ul>
<li>Gives the developer more control.</li>
<li>The developer can make sure it works on all target browsers.</li>
<li>Requires a lot of custom coding, or using a library (common practice).</li>
</ul>
<hr />
<h2 id="general-structure-of-html-page">General structure of HTML page</h2>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-5-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-5-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-5-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-5-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-5-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-5-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-5-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-5-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-5-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-5-10">10</a></span>
<span class="normal"><a href="#__codelineno-5-11">11</a></span>
<span class="normal"><a href="#__codelineno-5-12">12</a></span>
<span class="normal"><a href="#__codelineno-5-13">13</a></span>
<span class="normal"><a href="#__codelineno-5-14">14</a></span>
<span class="normal"><a href="#__codelineno-5-15">15</a></span>
<span class="normal"><a href="#__codelineno-5-16">16</a></span>
<span class="normal"><a href="#__codelineno-5-17">17</a></span>
<span class="normal"><a href="#__codelineno-5-18">18</a></span>
<span class="normal"><a href="#__codelineno-5-19">19</a></span>
<span class="normal"><a href="#__codelineno-5-20">20</a></span>
<span class="normal"><a href="#__codelineno-5-21">21</a></span>
<span class="normal"><a href="#__codelineno-5-22">22</a></span>
<span class="normal"><a href="#__codelineno-5-23">23</a></span>
<span class="normal"><a href="#__codelineno-5-24">24</a></span>
<span class="normal"><a href="#__codelineno-5-25">25</a></span>
<span class="normal"><a href="#__codelineno-5-26">26</a></span>
<span class="normal"><a href="#__codelineno-5-27">27</a></span>
<span class="normal"><a href="#__codelineno-5-28">28</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1"></a><span class="cm">&lt;!-- HTML Boilerplate --&gt;</span>
<a id="__codelineno-5-2" name="__codelineno-5-2"></a><span class="cp">&lt;!DOCTYPE html&gt;</span>
<a id="__codelineno-5-3" name="__codelineno-5-3"></a><span class="p">&lt;</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">&quot;en&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-5-4" name="__codelineno-5-4"></a> <span class="p">&lt;</span><span class="nt">head</span><span class="p">&gt;</span>
<a id="__codelineno-5-5" name="__codelineno-5-5"></a> <span class="cm">&lt;!-- meta tag --&gt;</span>
<a id="__codelineno-5-6" name="__codelineno-5-6"></a> <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">&quot;utf-8&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-5-7" name="__codelineno-5-7"></a> <span class="p">&lt;</span><span class="nt">title</span><span class="p">&gt;&lt;/</span><span class="nt">title</span><span class="p">&gt;</span>
<a id="__codelineno-5-8" name="__codelineno-5-8"></a> <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;description&quot;</span> <span class="na">content</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-5-9" name="__codelineno-5-9"></a> <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;author&quot;</span> <span class="na">content</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-5-10" name="__codelineno-5-10"></a>
<a id="__codelineno-5-11" name="__codelineno-5-11"></a> <span class="cm">&lt;!-- adapt page dimensions to device --&gt;</span>
<a id="__codelineno-5-12" name="__codelineno-5-12"></a> <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;viewport&quot;</span> <span class="na">content</span><span class="o">=</span><span class="s">&quot;width=device-width, initial-scale=1.0&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-5-13" name="__codelineno-5-13"></a>
<a id="__codelineno-5-14" name="__codelineno-5-14"></a> <span class="cm">&lt;!-- external style sheet here --&gt;</span>
<a id="__codelineno-5-15" name="__codelineno-5-15"></a> <span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">&quot;stylesheet&quot;</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;path/style-sheet.css&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-5-16" name="__codelineno-5-16"></a>
<a id="__codelineno-5-17" name="__codelineno-5-17"></a> <span class="cm">&lt;!-- script if necessary --&gt;</span>
<a id="__codelineno-5-18" name="__codelineno-5-18"></a> <span class="p">&lt;</span><span class="nt">script</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;_.js&quot;</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/javascript&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">script</span><span class="p">&gt;</span>
<a id="__codelineno-5-19" name="__codelineno-5-19"></a>
<a id="__codelineno-5-20" name="__codelineno-5-20"></a> <span class="cm">&lt;!-- script is executed only after the page finishes loading--&gt;</span>
<a id="__codelineno-5-21" name="__codelineno-5-21"></a> <span class="p">&lt;</span><span class="nt">script</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;_.js&quot;</span> <span class="na">defer</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/javascript&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">script</span><span class="p">&gt;</span>
<a id="__codelineno-5-22" name="__codelineno-5-22"></a> <span class="p">&lt;/</span><span class="nt">head</span><span class="p">&gt;</span>
<a id="__codelineno-5-23" name="__codelineno-5-23"></a> <span class="p">&lt;</span><span class="nt">body</span><span class="p">&gt;</span>
<a id="__codelineno-5-24" name="__codelineno-5-24"></a>
<a id="__codelineno-5-25" name="__codelineno-5-25"></a> <span class="cm">&lt;!-- end of body --&gt;</span>
<a id="__codelineno-5-26" name="__codelineno-5-26"></a> <span class="p">&lt;</span><span class="nt">script</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;_.js&quot;</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/javascript&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">script</span><span class="p">&gt;</span>
<a id="__codelineno-5-27" name="__codelineno-5-27"></a> <span class="p">&lt;/</span><span class="nt">body</span><span class="p">&gt;</span>
<a id="__codelineno-5-28" name="__codelineno-5-28"></a><span class="p">&lt;/</span><span class="nt">html</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<p>Attributes describe additional characteristics of an HTML element.<br />
<code>&lt;tagname attribute="value"&gt; content &lt;/tagname&gt;</code></p>
<h3 id="meta-tag-structure">Meta Tag Structure</h3>
<p><code>&lt;meta name="info-name" content="info-content"&gt;</code></p>
<h3 id="paragraph">Paragraph</h3>
<p>Paragraphs allow to format the content in a readable fashion.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-6-1">1</a></span>
<span class="normal"><a href="#__codelineno-6-2">2</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1"></a><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span> paragraph-content <span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
<a id="__codelineno-6-2" name="__codelineno-6-2"></a><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span> paragraph-content <span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="headings">Headings</h3>
<p>Heading numbers indicates hierarchy, not size.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-7-1">1</a></span>
<span class="normal"><a href="#__codelineno-7-2">2</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-7-1" name="__codelineno-7-1"></a><span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span> Heading 1 <span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span>
<a id="__codelineno-7-2" name="__codelineno-7-2"></a><span class="p">&lt;</span><span class="nt">h2</span><span class="p">&gt;</span> Heading 2 <span class="p">&lt;/</span><span class="nt">h2</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="formatted-text">Formatted Text</h3>
<p>With semantic value:</p>
<ul>
<li>Emphasized text (default cursive): <code>&lt;em&gt;&lt;/em&gt;</code> </li>
<li>Important text (default bold): <code>&lt;strong&gt;&lt;/strong&gt;</code> </li>
</ul>
<p>Without semantic value, used as last resort:</p>
<ul>
<li>Italic text: <code>&lt;i&gt;&lt;/i&gt;</code> </li>
<li>Bold text: <code>&lt;b&gt;&lt;/b&gt;</code></li>
</ul>
<h2 id="elements">Elements</h2>
<p><code>&lt;br/&gt;</code>: Line break (carriage return). It's not good practice to put line breaks inside paragraphs. </p>
<p><code>&lt;hr&gt;</code>: horizontal rule (line). Used to define a thematic change in the content.</p>
<h3 id="linksanchor">Links/Anchor</h3>
<p>Surround content to turn into links.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-8-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-8-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-8-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-8-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-8-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-8-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-8-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-8-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-8-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-8-10">10</a></span>
<span class="normal"><a href="#__codelineno-8-11">11</a></span>
<span class="normal"><a href="#__codelineno-8-12">12</a></span>
<span class="normal"><a href="#__codelineno-8-13">13</a></span>
<span class="normal"><a href="#__codelineno-8-14">14</a></span>
<span class="normal"><a href="#__codelineno-8-15">15</a></span>
<span class="normal"><a href="#__codelineno-8-16">16</a></span>
<span class="normal"><a href="#__codelineno-8-17">17</a></span>
<span class="normal"><a href="#__codelineno-8-18">18</a></span>
<span class="normal"><a href="#__codelineno-8-19">19</a></span>
<span class="normal"><a href="#__codelineno-8-20">20</a></span>
<span class="normal"><a href="#__codelineno-8-21">21</a></span>
<span class="normal"><a href="#__codelineno-8-22">22</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-8-1" name="__codelineno-8-1"></a><span class="cm">&lt;!-- Link to absolute URL --&gt;</span>
<a id="__codelineno-8-2" name="__codelineno-8-2"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;uri/url&quot;</span> <span class="na">title</span><span class="o">=</span><span class="s">&quot;content-title&quot;</span> <span class="na">target</span><span class="o">=</span><span class="s">&quot;_self&quot;</span><span class="p">&gt;</span> text/image <span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<a id="__codelineno-8-3" name="__codelineno-8-3"></a>
<a id="__codelineno-8-4" name="__codelineno-8-4"></a><span class="cm">&lt;!-- links to relative URL --&gt;</span>
<a id="__codelineno-8-5" name="__codelineno-8-5"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;//example.com&quot;</span><span class="p">&gt;</span>Scheme-relative URL<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<a id="__codelineno-8-6" name="__codelineno-8-6"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;/en-US/docs/Web/HTML&quot;</span><span class="p">&gt;</span>Origin-relative URL<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<a id="__codelineno-8-7" name="__codelineno-8-7"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;./file&quot;</span><span class="p">&gt;</span>Directory-relative URL<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<a id="__codelineno-8-8" name="__codelineno-8-8"></a>
<a id="__codelineno-8-9" name="__codelineno-8-9"></a><span class="cm">&lt;!-- Link to element on the same page --&gt;</span>
<a id="__codelineno-8-10" name="__codelineno-8-10"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;#element-id&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<a id="__codelineno-8-11" name="__codelineno-8-11"></a>
<a id="__codelineno-8-12" name="__codelineno-8-12"></a><span class="cm">&lt;!-- Link to top of page --&gt;</span>
<a id="__codelineno-8-13" name="__codelineno-8-13"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;#top&quot;</span><span class="p">&gt;</span> Back to Top <span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<a id="__codelineno-8-14" name="__codelineno-8-14"></a>
<a id="__codelineno-8-15" name="__codelineno-8-15"></a><span class="cm">&lt;!-- link to email --&gt;</span>
<a id="__codelineno-8-16" name="__codelineno-8-16"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;mailto:address@domain&quot;</span><span class="p">&gt;</span>address@domain<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<a id="__codelineno-8-17" name="__codelineno-8-17"></a>
<a id="__codelineno-8-18" name="__codelineno-8-18"></a><span class="cm">&lt;!-- link to telephone number --&gt;</span>
<a id="__codelineno-8-19" name="__codelineno-8-19"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;tel:+39(111)2223334&quot;</span><span class="p">&gt;</span>+39 111 2223334<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<a id="__codelineno-8-20" name="__codelineno-8-20"></a>
<a id="__codelineno-8-21" name="__codelineno-8-21"></a><span class="cm">&lt;!-- download link --&gt;</span>
<a id="__codelineno-8-22" name="__codelineno-8-22"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;./folder/filename&quot;</span> <span class="na">download</span><span class="p">&gt;</span>Download<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<p><code>target</code>:</p>
<ul>
<li><code>_blank</code>: opens linked document in a new window or <em>tab</em></li>
<li><code>_self</code>: opens linked document in the same frame as it was clicked (DEFAULT)</li>
<li><code>_parent</code>: opens the linked document in the parent frame</li>
<li><code>_top</code>: opens linked document in the full body of the window</li>
<li><code>frame-name</code>: opens the linked document in the specified frame</li>
</ul>
<h3 id="images">Images</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-9-1">1</a></span>
<span class="normal"><a href="#__codelineno-9-2">2</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1"></a><span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;image-location&quot;</span> <span class="na">alt</span><span class="o">=</span><span class="s">&quot;brief-description&quot;</span><span class="p">/&gt;</span> <span class="cm">&lt;!-- image element --&gt;</span>
<a id="__codelineno-9-2" name="__codelineno-9-2"></a><span class="cm">&lt;!-- alt should be always be populated for accessibility and SEO purposes --&gt;</span>
</code></pre></div></td></tr></table></div>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-10-1">1</a></span>
<span class="normal"><a href="#__codelineno-10-2">2</a></span>
<span class="normal"><a href="#__codelineno-10-3">3</a></span>
<span class="normal"><a href="#__codelineno-10-4">4</a></span>
<span class="normal"><a href="#__codelineno-10-5">5</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-10-1" name="__codelineno-10-1"></a><span class="cm">&lt;!-- supported by modern browsers --&gt;</span>
<a id="__codelineno-10-2" name="__codelineno-10-2"></a><span class="p">&lt;</span><span class="nt">figure</span><span class="p">&gt;</span>
<a id="__codelineno-10-3" name="__codelineno-10-3"></a> <span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;img-location&quot;</span> <span class="na">alt</span><span class="o">=</span><span class="s">&quot;description&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-10-4" name="__codelineno-10-4"></a> <span class="p">&lt;</span><span class="nt">figcaption</span><span class="p">&gt;</span> caption of the figure <span class="p">&lt;/</span><span class="nt">figcaption</span><span class="p">&gt;</span>
<a id="__codelineno-10-5" name="__codelineno-10-5"></a><span class="p">&lt;/</span><span class="nt">figure</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="unordered-list-bullet-list">Unordered list (bullet list)</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-11-1">1</a></span>
<span class="normal"><a href="#__codelineno-11-2">2</a></span>
<span class="normal"><a href="#__codelineno-11-3">3</a></span>
<span class="normal"><a href="#__codelineno-11-4">4</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-11-1" name="__codelineno-11-1"></a><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<a id="__codelineno-11-2" name="__codelineno-11-2"></a> <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span> <span class="cm">&lt;!-- list element --&gt;</span>
<a id="__codelineno-11-3" name="__codelineno-11-3"></a> <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<a id="__codelineno-11-4" name="__codelineno-11-4"></a><span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="ordered-list-numbered-list">Ordered list (numbered list)</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-12-1">1</a></span>
<span class="normal"><a href="#__codelineno-12-2">2</a></span>
<span class="normal"><a href="#__codelineno-12-3">3</a></span>
<span class="normal"><a href="#__codelineno-12-4">4</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-12-1" name="__codelineno-12-1"></a><span class="p">&lt;</span><span class="nt">ol</span><span class="p">&gt;</span>
<a id="__codelineno-12-2" name="__codelineno-12-2"></a> <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<a id="__codelineno-12-3" name="__codelineno-12-3"></a> <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<a id="__codelineno-12-4" name="__codelineno-12-4"></a><span class="p">&lt;/</span><span class="nt">ol</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="description-list-list-of-terms-and-descriptions">Description list (list of terms and descriptions)</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-13-1">1</a></span>
<span class="normal"><a href="#__codelineno-13-2">2</a></span>
<span class="normal"><a href="#__codelineno-13-3">3</a></span>
<span class="normal"><a href="#__codelineno-13-4">4</a></span>
<span class="normal"><a href="#__codelineno-13-5">5</a></span>
<span class="normal"><a href="#__codelineno-13-6">6</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-13-1" name="__codelineno-13-1"></a><span class="p">&lt;</span><span class="nt">dl</span><span class="p">&gt;</span>
<a id="__codelineno-13-2" name="__codelineno-13-2"></a> <span class="p">&lt;</span><span class="nt">dt</span><span class="p">&gt;</span>term<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;</span> <span class="cm">&lt;!-- define term/name --&gt;</span>
<a id="__codelineno-13-3" name="__codelineno-13-3"></a> <span class="p">&lt;</span><span class="nt">dd</span><span class="p">&gt;</span>definition<span class="p">&lt;/</span><span class="nt">dd</span><span class="p">&gt;</span> <span class="cm">&lt;!-- describe term/name --&gt;</span>
<a id="__codelineno-13-4" name="__codelineno-13-4"></a> <span class="p">&lt;</span><span class="nt">dt</span><span class="p">&gt;</span>term<span class="p">&lt;/</span><span class="nt">dt</span><span class="p">&gt;</span>
<a id="__codelineno-13-5" name="__codelineno-13-5"></a> <span class="p">&lt;</span><span class="nt">dd</span><span class="p">&gt;</span>definition<span class="p">&lt;/</span><span class="nt">dd</span><span class="p">&gt;</span>
<a id="__codelineno-13-6" name="__codelineno-13-6"></a><span class="p">&lt;/</span><span class="nt">dl</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="tables">Tables</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-14-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-14-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-14-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-14-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-14-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-14-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-14-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-14-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-14-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-14-10">10</a></span>
<span class="normal"><a href="#__codelineno-14-11">11</a></span>
<span class="normal"><a href="#__codelineno-14-12">12</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-14-1" name="__codelineno-14-1"></a><span class="p">&lt;</span><span class="nt">table</span><span class="p">&gt;</span>
<a id="__codelineno-14-2" name="__codelineno-14-2"></a> <span class="p">&lt;</span><span class="nt">thead</span><span class="p">&gt;</span> <span class="cm">&lt;!-- table head row --&gt;</span>
<a id="__codelineno-14-3" name="__codelineno-14-3"></a> <span class="p">&lt;</span><span class="nt">th</span><span class="p">&gt;&lt;/</span><span class="nt">th</span><span class="p">&gt;</span> <span class="cm">&lt;!-- table head, one for each column--&gt;</span>
<a id="__codelineno-14-4" name="__codelineno-14-4"></a> <span class="p">&lt;</span><span class="nt">th</span><span class="p">&gt;&lt;/</span><span class="nt">th</span><span class="p">&gt;</span>
<a id="__codelineno-14-5" name="__codelineno-14-5"></a> <span class="p">&lt;/</span><span class="nt">thead</span><span class="p">&gt;</span>
<a id="__codelineno-14-6" name="__codelineno-14-6"></a> <span class="p">&lt;</span><span class="nt">tbody</span><span class="p">&gt;</span> <span class="cm">&lt;!-- table content (body) --&gt;</span>
<a id="__codelineno-14-7" name="__codelineno-14-7"></a> <span class="p">&lt;</span><span class="nt">tr</span><span class="p">&gt;</span> <span class="cm">&lt;!-- table row --&gt;</span>
<a id="__codelineno-14-8" name="__codelineno-14-8"></a> <span class="p">&lt;</span><span class="nt">td</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;</span> <span class="cm">&lt;!-- table cell --&gt;</span>
<a id="__codelineno-14-9" name="__codelineno-14-9"></a> <span class="p">&lt;</span><span class="nt">td</span><span class="p">&gt;&lt;/</span><span class="nt">td</span><span class="p">&gt;</span>
<a id="__codelineno-14-10" name="__codelineno-14-10"></a> <span class="p">&lt;/</span><span class="nt">tr</span><span class="p">&gt;</span>
<a id="__codelineno-14-11" name="__codelineno-14-11"></a> <span class="p">&lt;/</span><span class="nt">tbody</span><span class="p">&gt;</span>
<a id="__codelineno-14-12" name="__codelineno-14-12"></a><span class="p">&lt;/</span><span class="nt">table</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="character-codes">Character Codes</h3>
<table>
<thead>
<tr>
<th>Code</th>
<th>Character</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&amp;copy;</code></td>
<td>Copyright</td>
</tr>
<tr>
<td><code>&amp;lt;</code></td>
<td>less than (<code>&lt;</code>)</td>
</tr>
<tr>
<td><code>&amp;gt;</code></td>
<td>greater than (<code>&gt;</code>)</td>
</tr>
<tr>
<td><code>&amp;amp;</code></td>
<td>ampersand (<code>&amp;</code>)</td>
</tr>
</tbody>
</table>
<h3 id="block-element">Block Element</h3>
<p>Used to group elements together into sections, eventually to style them differently.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-15-1">1</a></span>
<span class="normal"><a href="#__codelineno-15-2">2</a></span>
<span class="normal"><a href="#__codelineno-15-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-15-1" name="__codelineno-15-1"></a><span class="p">&lt;</span><span class="nt">div</span><span class="p">&gt;</span>
<a id="__codelineno-15-2" name="__codelineno-15-2"></a> <span class="cm">&lt;!-- content here --&gt;</span>
<a id="__codelineno-15-3" name="__codelineno-15-3"></a><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="inline-element">Inline Element</h3>
<p>Used to apply a specific style inline.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-16-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-16-1" name="__codelineno-16-1"></a><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span> non-styled content <span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;...&quot;</span><span class="p">&gt;</span> styled content <span class="p">&lt;/</span><span class="nt">span</span><span class="p">&gt;</span> non-styled content <span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="html5-new-tags">HTML5 new tags</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-17-1">1</a></span>
<span class="normal"><a href="#__codelineno-17-2">2</a></span>
<span class="normal"><a href="#__codelineno-17-3">3</a></span>
<span class="normal"><a href="#__codelineno-17-4">4</a></span>
<span class="normal"><a href="#__codelineno-17-5">5</a></span>
<span class="normal"><a href="#__codelineno-17-6">6</a></span>
<span class="normal"><a href="#__codelineno-17-7">7</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-17-1" name="__codelineno-17-1"></a><span class="p">&lt;</span><span class="nt">header</span><span class="p">&gt;&lt;/</span><span class="nt">header</span><span class="p">&gt;</span>
<a id="__codelineno-17-2" name="__codelineno-17-2"></a><span class="p">&lt;</span><span class="nt">nav</span><span class="p">&gt;&lt;/</span><span class="nt">nav</span><span class="p">&gt;</span>
<a id="__codelineno-17-3" name="__codelineno-17-3"></a><span class="p">&lt;</span><span class="nt">main</span><span class="p">&gt;&lt;/</span><span class="nt">main</span><span class="p">&gt;</span>
<a id="__codelineno-17-4" name="__codelineno-17-4"></a><span class="p">&lt;</span><span class="nt">section</span><span class="p">&gt;&lt;/</span><span class="nt">section</span><span class="p">&gt;</span>
<a id="__codelineno-17-5" name="__codelineno-17-5"></a><span class="p">&lt;</span><span class="nt">article</span><span class="p">&gt;&lt;/</span><span class="nt">article</span><span class="p">&gt;</span>
<a id="__codelineno-17-6" name="__codelineno-17-6"></a><span class="p">&lt;</span><span class="nt">aside</span><span class="p">&gt;&lt;/</span><span class="nt">aside</span><span class="p">&gt;</span>
<a id="__codelineno-17-7" name="__codelineno-17-7"></a><span class="p">&lt;</span><span class="nt">footer</span><span class="p">&gt;&lt;/</span><span class="nt">footer</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h2 id="html-forms-inputs">HTML Forms &amp; Inputs</h2>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-18-1">1</a></span>
<span class="normal"><a href="#__codelineno-18-2">2</a></span>
<span class="normal"><a href="#__codelineno-18-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1"></a><span class="p">&lt;</span><span class="nt">form</span> <span class="na">action</span><span class="o">=</span><span class="s">&quot;data-receiver&quot;</span> <span class="na">target</span><span class="o">=</span><span class="s">&quot;&quot;</span> <span class="na">method</span><span class="o">=</span><span class="s">&quot;http-method&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-18-2" name="__codelineno-18-2"></a> <span class="cm">&lt;!-- ALL form elements go here --&gt;</span>
<a id="__codelineno-18-3" name="__codelineno-18-3"></a><span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<p>Target:</p>
<ul>
<li><code>_blank</code>: submitted result will open in a new browser tab</li>
<li><code>_self</code>: submitted result will open in the same page (<em>default</em>)</li>
</ul>
<p>Method:</p>
<ul>
<li><code>get</code>: data sent via get method is visible in the browser's address bar</li>
<li><code>post</code>: data sent via post in not visible to the user</li>
</ul>
<p>PROs &amp; CONs of <code>GET</code> method:</p>
<ul>
<li>Data sent by the GET method is displayed in the URL</li>
<li>It is possible to bookmark the page with specific query string values</li>
<li>Not suitable for passing sensitive information such as the username and password</li>
<li>The length of the URL is limited</li>
</ul>
<p>PROs &amp; CONs of <code>POST</code> method:</p>
<ul>
<li>More secure than GET; information is never visible in the URL query string or in the server logs</li>
<li>Has a much larger limit on the amount of data that can be sent</li>
<li>Can send text data as well as binary data (uploading a file)</li>
<li>Not possible to bookmark the page with the query</li>
</ul>
<h3 id="basic-form-elements">Basic Form Elements</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-19-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-19-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-19-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-19-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-19-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-19-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-19-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-19-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-19-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-19-10">10</a></span>
<span class="normal"><a href="#__codelineno-19-11">11</a></span>
<span class="normal"><a href="#__codelineno-19-12">12</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-19-1" name="__codelineno-19-1"></a><span class="p">&lt;</span><span class="nt">form</span> <span class="na">action</span><span class="o">=</span><span class="s">&quot;&quot;</span> <span class="na">method</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-19-2" name="__codelineno-19-2"></a> <span class="p">&lt;</span><span class="nt">label</span> <span class="na">for</span><span class="o">=</span><span class="s">&quot;target-identifier&quot;</span><span class="p">&gt;</span>label-here<span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
<a id="__codelineno-19-3" name="__codelineno-19-3"></a> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;input-type&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;input-name&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value-sent&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;target-identifier&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-19-4" name="__codelineno-19-4"></a><span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span>
<a id="__codelineno-19-5" name="__codelineno-19-5"></a>
<a id="__codelineno-19-6" name="__codelineno-19-6"></a><span class="cm">&lt;!-- SAME AS --&gt;</span>
<a id="__codelineno-19-7" name="__codelineno-19-7"></a>
<a id="__codelineno-19-8" name="__codelineno-19-8"></a><span class="p">&lt;</span><span class="nt">form</span><span class="p">&gt;</span>
<a id="__codelineno-19-9" name="__codelineno-19-9"></a> <span class="p">&lt;</span><span class="nt">label</span><span class="p">&gt;</span>Label:
<a id="__codelineno-19-10" name="__codelineno-19-10"></a> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;input-type&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;input-name&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value-sent&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;target-identifier&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-19-11" name="__codelineno-19-11"></a> <span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
<a id="__codelineno-19-12" name="__codelineno-19-12"></a><span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<blockquote>
<p><strong>Note</strong>: The <code>&lt;label&gt;</code> tag is used to define the labels for <code>&lt;input&gt;</code> elements.</p>
</blockquote>
<p>Input Attributes:</p>
<ul>
<li><code>name</code>: assigns a name to the form control (used by JavaScript and queries)</li>
<li><code>value</code>: value to be sent to the server when the option is selected</li>
<li><code>id</code>: identifier for CSS and linking tags</li>
<li><code>checked</code>: initially selected or not (radiobutton, checkboxes, ...)</li>
<li><code>selected</code>: default selection of a dropdown</li>
</ul>
<h3 id="text-field">Text Field</h3>
<p>One line areas that allow the user to input text. </p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-20-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-20-1" name="__codelineno-20-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="na">placeholder</span><span class="o">=</span><span class="s">&quot;placeholder-text&quot;</span> <span class="na">spellcheck</span><span class="o">=</span><span class="s">&quot;true&quot;</span> <span class="na">pattern</span><span class="o">=</span><span class="s">&quot;\regex\&quot;</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<blockquote>
<p><strong>Note</strong>: Text inputs can display a placeholder text that will disappear as soon as some text is entered</p>
</blockquote>
<h3 id="password-field">Password Field</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-21-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-21-1" name="__codelineno-21-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;password&quot;</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="radio-buttons">Radio Buttons</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-22-1">1</a></span>
<span class="normal"><a href="#__codelineno-22-2">2</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-22-1" name="__codelineno-22-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;radio&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-22-2" name="__codelineno-22-2"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;radio&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value&quot;</span> <span class="na">checked</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="checkboxes">Checkboxes</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-23-1">1</a></span>
<span class="normal"><a href="#__codelineno-23-2">2</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-23-1" name="__codelineno-23-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-23-2" name="__codelineno-23-2"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">checked</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="dropdown-menus">Dropdown Menus</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-24-1">1</a></span>
<span class="normal"><a href="#__codelineno-24-2">2</a></span>
<span class="normal"><a href="#__codelineno-24-3">3</a></span>
<span class="normal"><a href="#__codelineno-24-4">4</a></span>
<span class="normal"><a href="#__codelineno-24-5">5</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-24-1" name="__codelineno-24-1"></a><span class="p">&lt;</span><span class="nt">select</span> <span class="na">multiple</span><span class="p">&gt;</span>
<a id="__codelineno-24-2" name="__codelineno-24-2"></a> <span class="p">&lt;</span><span class="nt">option</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value&quot;</span><span class="p">&gt;</span>Value<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span>
<a id="__codelineno-24-3" name="__codelineno-24-3"></a> <span class="p">&lt;</span><span class="nt">option</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value&quot;</span><span class="p">&gt;</span>Value<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span>
<a id="__codelineno-24-4" name="__codelineno-24-4"></a> <span class="p">&lt;</span><span class="nt">option</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value&quot;</span> <span class="na">selected</span><span class="p">&gt;</span>Value<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span>
<a id="__codelineno-24-5" name="__codelineno-24-5"></a><span class="p">&lt;/</span><span class="nt">select</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<p>Use <code>&lt;select&gt;</code> rather than radio buttons when the number of options to choose from is large
<code>selected</code> is used rather than checked.<br />
Provides the ability to select multiple options.<br />
Conceptually, <code>&lt;select&gt;</code> becomes more similar to checkboxes.</p>
<h3 id="file-select">File Select</h3>
<p>Upload a local file as an attachment. The <code>accept</code> attribute value is a string that defines the file types the file input should accept.<br />
This string is a comma-separated list of <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers">unique file type specifiers</a>.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-25-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-25-1" name="__codelineno-25-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;file&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;filename&quot;</span> <span class="na">accept</span><span class="o">=</span><span class="s">&quot;.txt,application/json,audio/*&quot;</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="text-area">Text Area</h3>
<p>Multi line text input.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-26-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-26-1" name="__codelineno-26-1"></a><span class="p">&lt;</span><span class="nt">textarea</span> <span class="na">rows</span><span class="o">=</span><span class="s">&quot;row-number&quot;</span> <span class="na">cols</span><span class="o">=</span><span class="s">&quot;column-number&quot;</span> <span class="p">&gt;</span>pre-existing editable test<span class="p">&lt;/</span><span class="nt">textarea</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="submit-reset">Submit &amp; Reset</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-27-1">1</a></span>
<span class="normal"><a href="#__codelineno-27-2">2</a></span>
<span class="normal"><a href="#__codelineno-27-3">3</a></span>
<span class="normal"><a href="#__codelineno-27-4">4</a></span>
<span class="normal"><a href="#__codelineno-27-5">5</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-27-1" name="__codelineno-27-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;submit&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;label&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-27-2" name="__codelineno-27-2"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;reset&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;label&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-27-3" name="__codelineno-27-3"></a><span class="cm">&lt;!-- OR --&gt;</span>
<a id="__codelineno-27-4" name="__codelineno-27-4"></a><span class="p">&lt;</span><span class="nt">button</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;submit&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;label&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-27-5" name="__codelineno-27-5"></a><span class="p">&lt;</span><span class="nt">button</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;reset&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;label&quot;</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<p><code>submit</code>: sends the form data to the location specified in the action attribute.<br />
<code>reset</code>: resets all forms controls to the default values.</p>
<h3 id="button">Button</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-28-1">1</a></span>
<span class="normal"><a href="#__codelineno-28-2">2</a></span>
<span class="normal"><a href="#__codelineno-28-3">3</a></span>
<span class="normal"><a href="#__codelineno-28-4">4</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-28-1" name="__codelineno-28-1"></a><span class="p">&lt;</span><span class="nt">button</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;button/reset/submit&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;label&quot;</span><span class="p">/&gt;</span>
<a id="__codelineno-28-2" name="__codelineno-28-2"></a>
<a id="__codelineno-28-3" name="__codelineno-28-3"></a><span class="cm">&lt;!-- can contain HTML --&gt;</span>
<a id="__codelineno-28-4" name="__codelineno-28-4"></a><span class="p">&lt;</span><span class="nt">button</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;button/reset/submit&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;lebel&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">button</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="fieldset">Fieldset</h3>
<p>Group controls into categories. Particularly important for screen readers.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-29-1">1</a></span>
<span class="normal"><a href="#__codelineno-29-2">2</a></span>
<span class="normal"><a href="#__codelineno-29-3">3</a></span>
<span class="normal"><a href="#__codelineno-29-4">4</a></span>
<span class="normal"><a href="#__codelineno-29-5">5</a></span>
<span class="normal"><a href="#__codelineno-29-6">6</a></span>
<span class="normal"><a href="#__codelineno-29-7">7</a></span>
<span class="normal"><a href="#__codelineno-29-8">8</a></span>
<span class="normal"><a href="#__codelineno-29-9">9</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-29-1" name="__codelineno-29-1"></a><span class="p">&lt;</span><span class="nt">fieldset</span><span class="p">&gt;</span>
<a id="__codelineno-29-2" name="__codelineno-29-2"></a> <span class="p">&lt;</span><span class="nt">legend</span><span class="p">&gt;</span>Color<span class="p">&lt;/</span><span class="nt">legend</span><span class="p">&gt;</span>
<a id="__codelineno-29-3" name="__codelineno-29-3"></a> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;radio&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;colour&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;red&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;colour_red&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-29-4" name="__codelineno-29-4"></a> <span class="p">&lt;</span><span class="nt">label</span> <span class="na">for</span><span class="o">=</span><span class="s">&quot;colour_red&quot;</span><span class="p">&gt;</span>Red<span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
<a id="__codelineno-29-5" name="__codelineno-29-5"></a> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;radio&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;colour&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;green&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;colour_green&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-29-6" name="__codelineno-29-6"></a> <span class="p">&lt;</span><span class="nt">label</span> <span class="na">for</span><span class="o">=</span><span class="s">&quot;colour_green&quot;</span><span class="p">&gt;</span>Green<span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
<a id="__codelineno-29-7" name="__codelineno-29-7"></a> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;radio&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;colour&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;blue&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;colour_blue&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-29-8" name="__codelineno-29-8"></a> <span class="p">&lt;</span><span class="nt">label</span> <span class="na">for</span><span class="o">=</span><span class="s">&quot;colour_blue&quot;</span><span class="p">&gt;</span>Red<span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
<a id="__codelineno-29-9" name="__codelineno-29-9"></a><span class="p">&lt;/</span><span class="nt">fieldset</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="email-field">Email Field</h3>
<p>Used to receive a valid e-mail address from the user. Most browsers can validate this without needing javascript.
Older browsers don't support this input type.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-30-1">1</a></span>
<span class="normal"><a href="#__codelineno-30-2">2</a></span>
<span class="normal"><a href="#__codelineno-30-3">3</a></span>
<span class="normal"><a href="#__codelineno-30-4">4</a></span>
<span class="normal"><a href="#__codelineno-30-5">5</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-30-1" name="__codelineno-30-1"></a><span class="p">&lt;</span><span class="nt">form</span><span class="p">&gt;</span>
<a id="__codelineno-30-2" name="__codelineno-30-2"></a> <span class="p">&lt;</span><span class="nt">label</span> <span class="na">for</span><span class="o">=</span><span class="s">&quot;user-email&quot;</span><span class="p">&gt;</span>Email:<span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
<a id="__codelineno-30-3" name="__codelineno-30-3"></a> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;email&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;user-email&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;form-email&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-30-4" name="__codelineno-30-4"></a> <span class="p">&lt;</span><span class="nt">button</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;submit&quot;</span><span class="p">&gt;</span>Send<span class="p">&lt;/</span><span class="nt">button</span><span class="p">&gt;</span>
<a id="__codelineno-30-5" name="__codelineno-30-5"></a><span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="progress-bar">Progress Bar</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-31-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-31-1" name="__codelineno-31-1"></a><span class="p">&lt;</span><span class="nt">progress</span> <span class="na">max</span><span class="o">=</span><span class="s">&quot;100&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;70&quot;</span><span class="p">&gt;</span> 70% <span class="p">&lt;/</span><span class="nt">progress</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="slider">Slider</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-32-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-32-1" name="__codelineno-32-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;range&quot;</span> <span class="na">min</span><span class="o">=</span><span class="s">&quot;0&quot;</span> <span class="na">max</span><span class="o">=</span><span class="s">&quot;20&quot;</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="meter">Meter</h3>
<p>The <code>&lt;meter&gt;</code> HTML element represents either a scalar value within a known range or a fractional value.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-33-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-33-1" name="__codelineno-33-1"></a><span class="p">&lt;</span><span class="nt">meter</span> <span class="na">min</span><span class="o">=</span><span class="s">&quot;0&quot;</span> <span class="na">max</span><span class="o">=</span><span class="s">&quot;100&quot;</span> <span class="na">low</span><span class="o">=</span><span class="s">&quot;33&quot;</span> <span class="na">high</span><span class="o">=</span><span class="s">&quot;66&quot;</span> <span class="na">optimum</span><span class="o">=</span><span class="s">&quot;80&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;50&quot;</span><span class="p">&gt;</span>current value<span class="p">&lt;/</span><span class="nt">meter</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="datalist-autocomplete">Datalist (Autocomplete)</h3>
<p>The <code>datalist</code> HTML element can provide suggestions to an input that targets it's <code>id</code> with the <code>list</code> attribute.</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-34-1">1</a></span>
<span class="normal"><a href="#__codelineno-34-2">2</a></span>
<span class="normal"><a href="#__codelineno-34-3">3</a></span>
<span class="normal"><a href="#__codelineno-34-4">4</a></span>
<span class="normal"><a href="#__codelineno-34-5">5</a></span>
<span class="normal"><a href="#__codelineno-34-6">6</a></span>
<span class="normal"><a href="#__codelineno-34-7">7</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-34-1" name="__codelineno-34-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">list</span><span class="o">=</span><span class="s">&quot;items&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-34-2" name="__codelineno-34-2"></a>
<a id="__codelineno-34-3" name="__codelineno-34-3"></a><span class="p">&lt;</span><span class="nt">datalist</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;items&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-34-4" name="__codelineno-34-4"></a> <span class="p">&lt;</span><span class="nt">option</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value-1&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-34-5" name="__codelineno-34-5"></a> <span class="p">&lt;</span><span class="nt">option</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value-2&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-34-6" name="__codelineno-34-6"></a> <span class="p">&lt;</span><span class="nt">option</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;value-3&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-34-7" name="__codelineno-34-7"></a><span class="p">&lt;/</span><span class="nt">datalist</span><span class="p">&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="more-input-types">More Input Types</h3>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">HTML</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-35-1">1</a></span>
<span class="normal"><a href="#__codelineno-35-2">2</a></span>
<span class="normal"><a href="#__codelineno-35-3">3</a></span>
<span class="normal"><a href="#__codelineno-35-4">4</a></span>
<span class="normal"><a href="#__codelineno-35-5">5</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-35-1" name="__codelineno-35-1"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;email&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;email&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;email&quot;</span> <span class="p">/&gt;</span>
<a id="__codelineno-35-2" name="__codelineno-35-2"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;url&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;url&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;url&quot;</span> <span class="p">/&gt;</span>
<a id="__codelineno-35-3" name="__codelineno-35-3"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;number&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;identifier&quot;</span> <span class="na">min</span><span class="o">=</span><span class="s">&quot;min-value&quot;</span> <span class="na">max</span><span class="o">=</span><span class="s">&quot;max-value&quot;</span> <span class="na">step</span><span class="o">=</span><span class="s">&quot;&quot;</span> <span class="p">/&gt;</span>
<a id="__codelineno-35-4" name="__codelineno-35-4"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;search&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;identifier&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">&gt;</span>
<a id="__codelineno-35-5" name="__codelineno-35-5"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;color&quot;</span> <span class="p">/&gt;</span>
</code></pre></div></td></tr></table></div>
<h3 id="using-built-in-form-validation"><a href="https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation">Using Built-In Form Validation</a></h3>
<p>One of the most significant features of HTML5 form controls is the ability to validate most user data without relying on JavaScript.<br />
This is done by using validation attributes on form elements.</p>
<ul>
<li><code>required</code>: Specifies whether a form field needs to be filled in before the form can be submitted.</li>
<li><code>minlength</code>, <code>maxlength</code>: Specifies the minimum and maximum length of textual data (strings)</li>
<li><code>min</code>, <code>max</code>: Specifies the minimum and maximum values of numerical input types</li>
<li><code>type</code>: Specifies whether the data needs to be a number, an email address, or some other specific preset type.</li>
<li><code>pattern</code>: Specifies a regular expression that defines a pattern the entered data needs to follow.</li>
</ul>
<p>If the data entered in an form field follows all of the rules specified by the above attributes, it is considered valid. If not, it is considered invalid.</p>
<p>When an element is valid, the following things are true:</p>
<ul>
<li>The element matches the <code>:valid</code> CSS <em>pseudo-class</em>, which lets you apply a specific style to valid elements.</li>
<li>If the user tries to send the data, the browser will submit the form, provided there is nothing else stopping it from doing so (e.g. JavaScript).</li>
</ul>
<p>When an element is invalid, the following things are true:</p>
<ul>
<li>The element matches the <code>:invalid</code> CSS <em>pseudo-class</em>, and sometimes other UI <em>pseudo-classes</em> (e.g. <code>:out-of-range</code>) depending on the error, which lets you apply a specific style to invalid elements.</li>
<li>If the user tries to send the data, the browser will block the form and display an error message.</li>
</ul>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
Back to top
</button>
</main>
<footer class="md-footer">
<nav class="md-footer__inner md-grid" aria-label="Footer" >
<a href="../../databases/mongo-db.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: MongoDB">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</div>
<div class="md-footer__title">
<span class="md-footer__direction">
Previous
</span>
<div class="md-ellipsis">
MongoDB
</div>
</div>
</a>
<a href="../markdown.html" class="md-footer__link md-footer__link--next" aria-label="Next: Markdown">
<div class="md-footer__title">
<span class="md-footer__direction">
Next
</span>
<div class="md-ellipsis">
Markdown
</div>
</div>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg>
</div>
</a>
</nav>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
<div class="md-copyright__highlight">
MIT
</div>
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
<div class="md-social">
<a href="https://hachyderm.io/@m_lamonaca" target="_blank" rel="noopener me" title="hachyderm.io" class="md-social__link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.5 102.5 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5m-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z"/></svg>
</a>
<a href="https://github.com/m-lamonaca" target="_blank" rel="noopener" title="github.com" class="md-social__link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../..", "features": ["navigation.instant", "navigation.indexes", "navigation.tracking", "navigation.pruning", "navigation.sections", "navigation.top", "navigation.tabs", "navigation.tabs.sticky", "navigation.footer", "toc.follow", "content.code.copy"], "search": "../../assets/javascripts/workers/search.07f07601.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
<script src="../../assets/javascripts/bundle.56dfad97.min.js"></script>
</body>
</html>