Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 23, 2020 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/5003147a9b0569f9080cdeaa906b133d to your computer and use it in GitHub Desktop.
Save codecademydev/5003147a9b0569f9080cdeaa906b133d to your computer and use it in GitHub Desktop.
Codecademy export
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css" type="text/css">
<title>HTML Forms Reference</title>
</head>
<body>
<h1>HTML Forms Reference Page</h1>
<h2>Form Elements & Attributes</h2>
<table>
<thead>
<tr>
<th>Element</th>
<th>Name</th>
<th>Explanation</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code">&lt;input&gt;</span></td>
<td>Input</td>
<td>Render a variety of input fields on a webpage</td>
</tr>
<tr>
<td><span class="code">&lt;label&gt;</span></td>
<td>Label</td>
<td>Provides indentification for an input element</td>
</tr>
<tr>
<td><span class="code">&lt;select&gt;</span></td>
<td>Select</td>
<td>Creates a dropdown list</td>
</tr>
<tr>
<td><span class="code">&lt;datalist&gt;</span></td>
<td>Datalist</td>
<td>Basic search/autocomplete functionality</td>
</tr>
<tr>
<td><span class="code">&lt;textarea&gt;</span></td>
<td>Text Area</td>
<td>Creating a text-box for multi-line input</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Name</th>
<th>Explanation</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="code">&lt;type="text"&gt;</span></td>
<td>Text Type</td>
<td>Support text input by setting the attribute</td>
</tr>
<tr>
<td><span class="code">&lt;type="password"&gt;</span></td>
<td>Password Type</td>
<td>Allows the user to type censored text</td>
</tr>
<tr>
<td><span class="code">&lt;type="number"&gt;</span></td>
<td>Number Type</td>
<td>Only numbers and a few special characters</td>
</tr>
<tr>
<td><span class="code">&lt;type="radio"&gt;</span></td>
<td>Radio Button Type</td>
<td>Renders a single radio button</td>
</tr>
</tbody>
</table>
</body>
</html>
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #222930;
color: #4EB1BA;
text-align: center;
/* special color: #E9E9E9 */
}
table {
border: 2px solid #4EB1BA;
color: #E9E9E9;
width: 650px;
margin: 50px auto;
}
.code {
background-color: #4EB1BA;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment