totn HTML

HTML Tutorial

HTML stands for HyperText Markup Language. It is the technology used to create web pages that are displayed on web browsers. All web developers should know how to write, structure, and troubleshoot HTML.

Our tutorial covers HTML elements within the declaration, head, and body sections of the HTML document. With this tutorial, you should be on your way to understanding and writing your own HTML.

Prerequisites

There are no prequisities for this HTML tutorial. You should be able to easily understand this tutorial and learn the basic concepts of HTML elements.

Now, let's get started!

Start Tutorial

Or jump directly to a topic in HTML:

HTML Document (Declarations and main container)

<!DOCTYPE> HTML Document type
<html> Container for all other HTML tags

HEAD Section of HTML Document

<head> Metadata and browser instructions
<link> Link to an external resource
<meta> Information and metadata not directly visible on web page
<script> Embed or reference client-side server script
<title> Title of the document
<base> Defines a base URL for all relative URLs
<basefont> Defines the default font-family, font-size and color for the text in the HTML document

BODY Section of HTML Document

<a> Hyperlink to a URL or a target within the HTML document
<abbr> Defines an abbreviation or acronym
<acronym> Defines an acronym
<address> Contact information for nearest <article> or <body> ancestor
<area> Defines a clickable area (or hotspot) inside of an image map
<article> Self-contained composition (HTML5)
<aside> Section tangentially related to the content around it (HTML5)
<b> Gives text a bold appearance (no semantic meaning)
<big> Defines text one font size bigger (obsolete in HTML5)
<blockquote> Defines a long block quotation from another source
<body> Body of document that is visible on web page
<br> Line break
<button> Clickable button
<canvas> Container used to draw graphics in a document
<caption> Title of a table
<center> Centers the text horizontally
<cite> Defines the title of a creative work
<code> Fragment of computer code
<col> Defines for properties for a column
<colgroup> Groups a set of columns in a table
<datalist> Defines a list of suggested values for an <input>
<dd> Defines a description (for a term) in a description list
<del> Markup text that has been deleted from a document but retained to show the history of changes
<dfn> Marks a term that is being defined
<div> Generic container
<dl> Defines a description list
<dt> Defines a term in a description list
<em> Marks text that has stress emphasis
<embed> Used as a container to embed external content
<fieldset> Used to group related elements in an HTML form
<font> Defines font size, color and face of text
<footer> Footer (HTML5)
<form> Creates a form on a web page that has interactive controls for user input
<h1> Heading 1 (highest level and most important)
<h2> Heading 2 (second level)
<h3> Heading 3 (third level)
<h4> Heading 4 (fourth level)
<h5> Heading 5 (fifth level)
<h6> Heading 6 (sixth level and least important)
<header> Header (HTML5)
<hr> Thematic break in HTML5, horizontal rule in HTML 4.01
<i> Gives text an italicized appearance (no semantic meaning)
<iframe> Embed another HTML page into your current page
<img> Image
<input> Interactive control for entering data
<ins> Markup text that has been inserted into a document to show the history of changes
<kbd> Defines text as user input from a keyboard
<label> Generates a caption for a user input
<legend> Generates a caption for a <fieldset>
<li> List item for <ol>, <ul> or <menu>
<main> Defines the main content in the document (HTML5)
<map> Defines an image map with clickable areas
<mark> Marks or highlights text that is of special interest or relevance
<marquee> Defines a scrolling text area
<menu> Unordered menu list (not implemented in browsers)
<nav> Section with navigation links (HTML5)
<noscript> Alternate HTML if script type not supported or scripting disabled on browser
<object> Used as a container to embed an external resource
<ol> Ordered list
<optgroup> Creates a group of options within a dropdown list
<option> creates an item in a <select>, <datalist> or <optgroup>
<p> Paragraph
<pre> Preformatted text preserving whitespace and line breaks
<q> Defines a short inline quotation from another source
<s> Gives text the appearance of a strikethrough
<script> Embed or reference client-side server script
<section> Generic section (HTML5)
<select> Creates a dropdown list of values
<small> Defines text one font size smaller
<span> Generic inline container
<strike> Gives text the appearance of a strikethrough
<strong> Gives text a strong emphasis
<style> Embeds CSS into the HTML document
<sub> Defines subscript text
<sup> Defines superscript text
<table> Table
<tbody> Defines a set of rows that make up the body of a table
<td> Standard cell in a table
<tfoot> Defines a set of rows that make up the footer of a table
<th> Header cell in a table
<thead> Defines a set of rows that make up the column headings in a table
<time> Time value on a 24-hour clock or a date in the Gregorian calendar (HTML5)
<tr> Row in a table
<u> Defines text that should be styled differently or have a non-textual annotation
<ul> Unordered list

Global Attributes

Global Attributes Attributes that apply to all HTML elements

Support for HTML5

HTML5shiv Javascript workaround to provide support for new HTML5 elements in older IE browsers

Validators

CSS Validator Validate your CSS
HTML Validator Validate your HTML