HTML Programming Cheatsheet
<!DOCTYPE html>
Defines the document type and HTML version.
<html>
Root element of an HTML page.
<head>
Container for meta information, title, links, etc.
<title>
Specifies the title of the document.
<body>
Contains the visible page content.
<h1> to <h6>
Header tags. <h1> is the largest, <h6> the smallest.
<p>
Defines a paragraph.
<a href='url'>
Defines a hyperlink.
<img src='url' alt='text'>
Embeds an image.
<ul>, <ol>, <li>
Defines unordered/ordered lists and list items.
<div>
Generic container for content.
<span>
Inline container for text.
<br>
Inserts a line break.
<hr>
Inserts a horizontal rule.
<form>
Defines an HTML form.
<input>
Defines an input field.
<button>
Defines a clickable button.
<table>, <tr>, <td>, <th>
Defines a table, row, cell, and header cell.
<link>
Defines relationship between document and external resource.
<script>
Defines client-side JavaScript.