Hey Devs, This is the most complete and well-structured HTML cheatsheet you can find online!!
So let's start.
Basic Tags
<html> </html>
Ā - Creates an HTML document<head> </head>
Ā - Sets off the title & other info that isn't displayed<body> </body>
Ā - Sets off the visible portion of the document<title> </title>
Ā - Puts name of the document in the title bar; whenbookmarking pages, this is what is bookmarked
Formatting
<p> </p>
Ā - Creates a new paragraph<br>
Ā - Inserts a line break (carriage return)<blockquote> </blockquote>
Ā - Puts content in a quote - indents text from both sides<div> </div>
Ā - Used to format block content with CSS<span> </span>
Ā - Used to format inline content with CSSBody attributes
<body bgcolor="?">
Ā - Sets background color, using a name or hex value<body text="?">
Ā - Sets text color, using name or hex value<body link="?">
Ā - Sets color of links, using name or hex value<body vlink="?">
Ā - Sets the color of visited links, using a name or hex value<body alink="?">
Ā - Sets the color of active links (while mouse-clicking)Lists
<ul> </ul>
Ā - Creates an unordered list<ol start=?> </ol>
Ā - Creates an ordered list (start=xx, where xx is a counting number)<li> </li>
Ā - Encompasses each list item<dl> </dl>
Ā - Creates a definition list<dt>
Ā - Precedes each definition term<dd>
Ā - Precedes each definitionText Tags
<pre> </pre>
Ā - Creates preformatted text<h1> </h1>
Ā -->Ā <h6> </h6>
Ā - Creates headlines -- H1=largest, H6=smallest<b> </b>
Ā - Creates bold text (should useĀ instead)<i> </i>
Ā - Creates italicized text (should useĀ instead)<tt> </tt>
Ā - Creates typewriter-style text<code> </code>
Ā - Used to define source code, usually monospace<cite> </cite>
Ā - Creates a citation, usually processed in italics<address> </address>
Ā - Creates address section, usually processed in italics<em> </em>
Ā - Emphasizes a word (usually processed in italics)<strong> </strong>
Ā - Emphasizes a word (usually processed in bold)<font size=?> </font>
Ā - Sets size of font - 1 to 7 (should use CSS instead)<font color=?> </font>
Ā - Sets font color (should use CSS instead)<font face=?> </font>
Ā - Defines the font used (should use CSS instead)Graphical elements
<hr>
Ā - Inserts a horizontal rule<hr size=?>
Ā - Sets size (height) of horizontal rule<hr width=?>
Ā - Sets width of rule (as a % or absolute pixel length)<hr noshade>
Ā - Creates a horizontal rule without a shadow<img src="URL" />
Ā - Adds image; it is a separate file located at the URL<img src="URL" align=?>
Ā - Aligns image left/right/center/bottom/top/middle (use CSS)<img src="URL" border=?>
Ā - Sets size of border surrounding image (use CSS)<img src="URL" height=?>
Ā - Sets height of image, in pixels<img src="URL" width=?>
Ā - Sets width of image, in pixels<img src="URL" alt=?>
Ā - Sets the alternate text for browsers that can't process images (required by the ADA)Links
<a href="URL">clickable text</a>
Ā - Creates a hyperlink to a Uniform Resource Locator<a href="mailto:EMAIL_ADDRESS">clickable text</a>
Ā - Creates a hyperlink to an email address<a name="NAME">
Ā - Creates a target location within a document<a href="#NAME">clickable text</a>
Ā - Creates a link to that target locationForms
<form> </form>
Ā - Defines a form<select multiple name=? size=?> </select>
Ā - Creates a scrolling menu. Size sets the number of menu items visible before user needs to scroll.<select name=?> </select>
Ā - Creates a pulldown menu<option>
Ā - Sets off each menu item<textarea name=? cols="x" rows="y"></textarea>
Ā - Creates a text box area. Columns set the width; rows set the height.<input type="checkbox" name=? value=?>
Ā - Creates a checkbox.<input type="checkbox" name=? value=? checked>
Ā - Creates a checkbox which is pre-checked.`<input type="radio" name=? value=?>
Ā - Creates a radio button.<input type="radio" name=? value=? checked>
Ā - Creates a radio button which is pre-checked.<input type="text" name=? size=?>
Ā - Creates a one-line text area. Size sets length, in characters.<input type="submit" value=?>
Ā - Creates a submit button. Value sets the text in the submit button.<input type="image" name=? src=? border=? alt=?>
Ā - Creates a submit button using an image.<input type="reset">
Ā - Creates a reset buttonHTML5 input tag attributes
<input type="email" name=?>
Ā - Sets a single-line textbox for email addresses<input type="url" name=?>
Ā - Sets a single-line textbox for URLs<input type="number" name=?>
Ā - Sets a single-line textbox for a number<input type="range" name=?>
Ā - Sets a single-line text box for a range of numbers<input type="date/month/week/time" name=?>
Ā - Sets a single-line text box with a calendar showing the date/month/week/time<input type="search" name=?>
Ā - Sets a single-line text box for searching<input type="color" name=?>
Ā - Sets a single-line text box for picking a colorTables
<table> </table>
Ā - Creates a table<tr> </tr>
Ā - Sets off each row in a table<td> </td>
Ā - Sets off each cell in a row<th> </th>
Ā - Sets off the table header (a normal cell with bold, centered text)Table attributes
<table border=?>
Ā - Sets the width of the border around table cells<table cellspacing=?>
Ā - Sets the amount of space between table cells<table cellpadding=?>
Ā - Sets the amount of space between a cell's border and its contents<table width=?>
Ā - Sets the width of the table in pixels or as a percentage<tr align=?>
Ā - Sets alignment for cells within the row (left/center/right)<td align=?>
Ā - Sets alignment for cells (left/center/right)<tr valign=?>
Ā - Sets vertical alignment for cells within the row (top/middle/bottom)<td valign=?>
Ā - Sets vertical alignment for cell (top/middle/bottom)<td rowspan=?>
Ā - Sets number of rows a cell should span (default=1)<td colspan=?>
Ā - Sets the number of columns a cell should span<td nowrap>
Ā - Prevents lines within a cell from being broken to fitHope this helped and thanks for reading!
Please smash that like button and share this article with others :)
Don't Forget To Follow Me OnĀ TwitterĀ andĀ @garvitmotwani