HTML Flashcards

A great way to learn the HTML elements is with flashcards. The HTML flashcards shown here are the HTML elements I use most often in creating websites.

Flip over each flashcard to see the answer. Once you know an element, keep it flipped over.

<!DOCTYPE html>


<!DOCTYPE html>


Document type declaration in HTML5

<html lang="en"></html>


<html lang="en"></html>


Defines the root of an HTML document

<head></head>


<head></head>


Contains the meta data for an HTML document

<body></body>


<body></body>


Defines the document body, where the web content is nested

<title></title>


<title></title>


Defines the title for the document and displays in the browser bar.

<style></style>


<style></style>


Defines style information for the document (CSS)

<a></a>


<a></a>


the anchor tag is used for hyperlinks

<div></div>


<div></div>


Defines a section of a document and is a block element.

<span></span>


<span></span>


Defines a section of a document and is an inline element.

<hr>


<hr>


Creates a horizonal rule line and is a self-closing tag.

<br>


<br>


Creates a single line break and is a self-closing tag.

<img src="" width="" height="" alt="">


<img src="" width="" height="" alt="">


Defines an embedded image. Use with the attribute src, alt, height, and width.

<header></header>


<header></header>


Defines a header for a document and is a semantic element new in HTML5.

<nav></nav>


<nav></nav>


Defines a navigation section for a document and is a semantic element new in HTML5.

<main></main>


<main></main>


Defines the main section of the webpage for content and is a semantic element new in HTML5.

<footer></footer>


<footer></footer>


Defines a footer for a document and is a semantic element new in HTML5.

<p></p>


<p></p>


Defines a paragraph.

<h1></h1>


<h1></h1>


Defines the largest HTML heading and is important for SEO. Generally, there should be one per page.

<h2></h2>


<h2></h2>


Defines the second largest HTML heading and is also important for SEO.

<ul></ul>


<ul></ul>


Defines an unordered or bulleted list. Also used for navigation.

<ol></ol>


<ol></ol>


Defines an ordered or numbered list.

<li></li>


<li></li>


Defines a list item.

<table></table>


<table></table>


Defines a table.

<tr></tr>


<tr></tr>


Defines a row in a table.

<td></td>


<td></td>


Defines a cell in a row.

<form></form>


<form></form>


Used to create a form for user input

<input></input>


<input></input>


A field that is used to enter data

<label></label>


<label></label>


Used with the input tag to define what the user should enter into the field.

<textarea></textarea>


<textarea></textarea>


A field that is used for multiline responses.

<select></select>


<select></select>


A dropdown list. Used with option elements.

<option></option>


<option></option>


The choices in a dropdown list. Used in a select element.