HTML CHEAT SHEET

Document Structure

<!DOCTYPE html> Defines document type as html (doesn't require closing) <html> Used to define html section of document
<!--	-->
Used to define a comment in the code <head> Used to define non-visible section of document <title> Used to define tab text <link rel="stylesheet" type="text/css" href=link /> Links to external css document <style> Used to have embedded css <link rel="icon" href=link /> Used to set tab icon <script> Used to define javascript code <meta> Used to define keywords (not displayed) <body> Used to define visible elements

Tables

<table> Used to define a table <thead> Used to define a table header <tbody> Used to define a table body <tfoot> Used to define a table footer <tr> Used to define a row in a table <th> Used to define a cell in a row in <thead> <td> Used to define a cell in a row

Lists

<ol> Used to create numbered list <ul> Used to create bullet point list <li> Used to create an item in a list

Headings

<h1> Used as major heading <h2> Second level heading <h3> Third level heading <h4> Fourth level heading <h5> Fith level heading <h6> Lowest Level Heading

Layout

<header> Used to define the header section of a webpage <nav> Used to define the navigation bar <aside> Used to define a sidebar <section> Used to define main area of webpage <article> Used to define an article in a webpage <footer> Used to define the footer on a webpage <div> Used to define an area on a webpage

Text Formatting

<p> Used to define paragraph text <span> Used to insert formatting in a section of text <pre> Defines preformatted text <b> Defines bold text <strong> Defines important text <i> Defines italic text <em> Defines emphasized text <small> Defines small text <sub> Defines subscript text <sup> Defines superscript text <ins> Defines underlined text <del> Defines strikethrough text <mark> Defines highlighted text <code> Defines text to be shown as code <q> Defines a short quote <blockquote> Defines a large quote <abbr> Defines an abbreviation <cite> Defines the title of a work

Text Formatting

<p> Used to define paragraph text <span> Used to insert formatting in a section of text <pre> Defines preformatted text <b> Defines bold text <strong> Defines important text <i> Defines italic text <em> Defines emphasized text <small> Defines small text <sub> Defines subscript text <sup> Defines superscript text <ins> Defines underlined text <del> Defines strikethrough text <mark> Defines highlighted text <code> Defines text to be shown as code <q> Defines a short quote <blockquote> Defines a large quote <abbr> Defines an abbreviation <cite> Defines the title of a work

Lists

<ol> Used to create numbered list <ul> Used to create bullet point list <li> Used to create an item in a list

Tables

<table> Used to define a table <thead> Used to define a table header <tbody> Used to define a table body <tfoot> Used to define a table footer <tr> Used to define a row in a table <th> Used to define a cell in a row in <thead> <td> Used to define a cell in a row