This HTML Cheat Sheet contains information about HTML Tags, HTML Attributes, HTML Symbols and Structure of HTML5 Document. You can also learn how to use common HTML Elements in web pages.
Table of Contents
Blank HTML Page
The Blank HTML page looks like this, copy the code and save it in file with .html extension, your first blank HTML page will be ready.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page Title</title>
</head>
<body>
<!-- Body Content -->
</body>
</html>
HTML5 Document Structure
The Basic Structure of HTML5 Document is shown below. The HTML5 document contain header, section, article, aside and footer tags, all these tags are HTML5 tags.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Title</title>
<meta name="author" content="Your Name">
<meta name="description" content="Description of Page">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="">
<link rel="icon" type="image/x-icon" href="" />
</head>
<body>
<header>
<nav>
<ul>
<li>Menu</li>
</ul>
</nav>
</header>
<section>
<article>
<!-- Main Section -->
</article>
</section>
<aside>
<!-- About Section -->
</aside>
<footer>
<!-- Footer Section -->
</footer>
<script type="text/javascript" src=""></script>
</body>
</html>
HTML Heading Tags
All six HTML Heading Tags are written below.
<h1>Level 1 Heading</h1>
<h2>Level 2 Heading</h2>
<h3>Level 3 Heading</h3>
<h4>Level 4 Heading</h4>
<h5>Level 5 Heading</h5>
<h6>Level 6 Heading</h6>
HTML Paragraph Tag
HTML Paragraph Tag is to write simple text in web page.
<p>Paragraph Text</p>
HTML Image
HTML Image Tag is to embed images in HTML Document.
<img src="image.jpg" alt="logo" />
HTML Audio
Audio Files are embedded in HTML Document using HTML Audio Tag.
<audio controls>
<source src="song.mp3" type="audio/mpeg">
</audio>
HTML Video
To embed Videos in your Website or HTML Document use HTML Video Tag.
<audio controls>
<video width="250" height="150" controls>
<source src="intro.mp4" type="video/mp4">
</video>
HTML IFrame
HTML IFrame Tag is used to embed any other document in a web page. Use HTML IFrame Code Generator to Generate the IFrame Tag Code.
<iframe src="url.html" width="200" height="200">
</iframe>
HTML Links
HTML Links are created using the HTML Anchor Tag.
<a href="www.howtocodeschool.com">Learn HTML</a>
HTML Tags By Category
There are around 119 different types of HTML Tags, HTML Tags are categorized into following categories.
The main types of HTML Tags are Basic HTML Tags, Formatting HTML Tags, Forms and Input Tags, Frame Tags, Style and Semantic Tags, Link Tags, Audio Video Tags, Meta Tags, Programming Tags and Table Tags.
Basic HTML Tags
-
HTML comment Tag
The HTML comment tag is used to write comments in main HTML code file. Read More.
-
HTML doctype Tag
The Doctype declaration is used to tell the Browser about the version of HTML. Read More.
-
HTML Tag
HTML Tag is used to define the root of HTML Document.
-
HTML head Tag
HTML Head Tag contains the meta information about the web page.
-
HTML title Tag
HTML title Tag is used to define title of web page.
-
HTML body Tag
HTML body Tag is used to define the Web Page Body. Read more.
-
HTML headings Tag (h1 to h6)
HTML Headings Tag are used to create HTML Headings.
-
HTML p Tag
HTML p Tag defines paragraph element.
-
HTML br Tag
HTML br Tag is used create a line break in normal flow of content. Read more.
-
HTML hr Tag
HTML hr Tag is used to insert a horizontal rule.
Formatting HTML Tags
-
HTML acronym Tag
Acronym Tag is like abbr tag. Acronym tag is used to define the abbreviation. Read More.
-
HTML abbr Tag
The abbr tag is used to define an abbreviation like HTML, CSS etc. Read More.
-
HTML address Tag
The address tag is used to define contact information of the author of a website or document. Read More.
-
HTML b Tag
HTML b Tag is used to define the bold text. Read more.
-
HTML bdi Tag
HTML bdi Tag is used to write the text with a different direction from other text. Read more.
-
HTML bdo Tag
HTML bdo Tag is used to override the text direction. Read more.
-
HTML big Tag
HTML big Tag is used to define big text. Read more.
-
HTML blockquote Tag
HTML blockquote Tag is used to quote content from some other source. Read more.
-
HTML center Tag
HTML center Tag is used to centralize the text.
-
HTML cite Tag
HTML cite Tag is used to define the title of the work.
-
HTML code Tag
HTML code Tag is used to define the code in document.
-
HTML del Tag
HTML del Tag defines the deleted text from the document.
-
HTML dfn Tag
HTML dfn Tag is used to define the defining instance of a term.
-
HTML em Tag
HTML em Tag defines emphasized text.
-
HTML font Tag
HTML font Tag defines font for text.
-
HTML i Tag
HTML i Tag is used to define the term that is prominent or different from other text.
-
HTML ins Tag
HTML ins Tag is used to define inserted text.
-
HTML kbd Tag
HTML kbd Tag is used to define keyboard input.
-
HTML mark Tag
HTML mark Tag is used to define highlighted text.
-
HTML meter Tag
HTML meter Tag defines scalar measurement.
-
HTML pre Tag
HTML pre Tag is used to define pre-formatted text.
-
HTML progress Tag
HTML progress Tag is used to represent the progress of particular task.
-
HTML q Tag
HTML q Tag is used to define short quotation.
-
HTML rp Tag
HTML rp Tag is used to define content to display when ruby annotations are not supported.
-
HTML rt Tag
HTML rt Tag defines explanation of characters.
-
HTML ruby Tag
HTML ruby Tag is used to define ruby annotation.
-
HTML s Tag
HTML s Tag is used to define incorrect text.
-
HTML samp Tag
HTML samp Tag is used to define sample output of computer program.
-
HTML small Tag
HTML small Tag is used to define smaller text.
-
HTML strike Tag
HTML strike Tag is used to define strike-through text.
-
HTML strong Tag
HTML strong Tag is used to define important text.
-
HTML sub Tag
HTML sub Tag is used to define sub-scripted text.
-
HTML sup Tag
HTML sup Tag is used to define super-scripted text.
-
HTML template Tag
HTML template Tag is used to define a template.
-
HTML time Tag
HTML time Tag is used to define time and date.
-
HTML tt Tag
HTML tt Tag is used to define teletype text.
-
HTML u Tag
HTML u Tag is used to define text that is different from other text. It is underlined.
-
HTML var Tag
HTML var Tag is used to define variable.
-
HTML wbr Tag
HTML wbr Tag is used to define possible line break.
Forms and Input Tags
-
HTML form Tag
HTML form Tag is used to create Form.
-
HTML input Tag
HTML input Tag is used to define Input Element.
-
HTML textarea Tag
HTML textarea Tag is used to define a text input element.
-
HTML button Tag
HTML button Tag is used to create the HTML button.
-
HTML select Tag
HTML select Tag is used to define drop down list.
-
HTML optgroup Tag
HTML optgroup Tag defines group of options in drop-down list.
-
HTML option Tag
HTML option Tag defines option for select element.
-
HTML label Tag
HTML label Tag is used to define label for input element.
-
HTML legend Tag
HTML legend Tag is used to define caption for fieldset element.
-
HTML fieldset Tag
HTML fieldset Tag defines related elements in a form.
-
HTML datalist Tag
HTML datalist Tag defines the input control options list.
-
HTML output Tag
HTML output Tag defines result of calculation.
Frame Tags
-
HTML frame Tag
HTML frame Tag defines a frame in a frameset.
-
HTML frameset Tag
HTML frameset Tag creates set of frames.
-
HTML iframe Tag
HTML iframe Tag is used to define frame element.
-
HTML noframes Tag
HTML noframes Tag defines alternative content if frames are not supported.
Images Tags
-
HTML img Tag
HTML img Tag is used to define Image Content.
-
HTML map Tag
HTML map Tag defines image map.
-
HTML area Tag
The area tag defines area inside an image map. Read More.
-
HTML canvas Tag
HTML canvas Tag is used to draw graphics element using JavaScript.
-
HTML figcaption Tag
HTML figcaption Tag defines caption for figure tag.
-
HTML figure Tag
HTML figure Tag defines self contained content.
-
HTML picture Tag
HTML picture Tag is used to define container for more than one image resources.
-
HTML svg Tag
HTML svg Tag is used to define container for SVG graphics.
Audio/Video Tags
-
HTML audio Tag
HTML audio Tag is used to define the audio content. Read more.
-
HTML track Tag
HTML track Tag is used to define track of media element.
-
HTML video Tag
HTML video Tag is used to define video content.
-
HTML source Tag
HTML source Tag is used to define media resources for media elements.
Link Tags
-
HTML anchor Tag
The anchor tag is used to create hyperlinks on web page. Read More.
-
HTML link Tag
HTML link Tag is used to include CSS style sheets.
-
HTML nav Tag
HTML nav Tag defines navigation section of web page.
List Tags
-
HTML ol Tag
HTML ol Tag defines ordered list.
-
HTML ul Tag
HTML ul Tag is used to define unordered list.
-
HTML li Tag
HTML li Tag is used to define list item.
-
HTML dir Tag
HTML dir Tag defines the directory list.
-
HTML dl Tag
HTML dl Tag defines the description list.
-
HTML dt Tag
HTML dt Tag defines the term in description list.
-
HTML dd Tag
HTML dd Tag defines the description of the term in description list.
Table Tags
-
HTML table Tag
HTML table Tag is used to create HTML tables.
-
HTML caption Tag
HTML caption Tag is define the table caption.
-
HTML td Tag
HTML td Tag is used to define a single cell of table.
-
HTML tr Tag
HTML tr Tag is used to define row of table.
-
HTML th Tag
HTML th Tag is used to define header cell of table.
-
HTML tbody Tag
HTML tbody Tag is used to define body of table.
-
HTML tfoot Tag
HTML tfoot Tag is used to define footer of table.
-
HTML thead Tag
HTML thead Tag is used to define header of table.
-
HTML col Tag
HTML col Tag is used to define column properties for columns in column group.
-
HTML colgroup Tag
HTML colgroup Tag is used to define group of columns in table.
Style and Semantic Tags
-
HTML div Tag
HTML div Tag defines the container for content.
-
HTML style Tag
HTML style Tag is used to write CSS Code.
-
HTML span Tag
HTML span Tag is an inline container used to style text.
-
HTML header Tag
HTML Header Tag is used to create header section of the document.
-
HTML footer Tag
HTML footer Tag defines footer of document or web page.
-
HTML main Tag
HTML main Tag defines main content of document.
-
HTML section Tag
HTML section Tag is used to define section in document.
-
HTML article Tag
HTML article Tag is used for the independent content. Read More.
-
HTML aside Tag
HTML aside Tag is used to define the aside content from main content. Read more.
-
HTML details Tag
HTML details Tag defines the extra details about content.
-
HTML dialog Tag
HTML dialog Tag defines the dialog box.
-
HTML data Tag
HTML data Tag is used to define machine readable translation.
-
HTML summary Tag
HTML summary Tag is used to define heading for details element.
Meta Tags
-
HTML meta Tag
HTML meta Tag defines meta data of HTML Document.
-
HTML head Tag
HTML Head Tag contains the meta information about the web page.
-
HTML base Tag
HTML base Tag defines the base URL of all the URLS in HTML Document. Read more.
-
HTML basefont Tag
HTML basefont Tag is used to define the size, color, and font of all text in the document. Read more.
Programming Tags
-
HTML script Tag
HTML script Tag is used to define script.
-
HTML noscript Tag
HTML noscript Tag defines alternative script if some script is not supported.
-
HTML applet Tag
The applet tag is used to embed Java applets in HTML. Read More.
-
HTML embed Tag
HTML embed Tag defines container for external content.
-
HTML object Tag
HTML object Tag defines embedded object.
-
HTML param Tag
HTML param Tag is used to define parameter for object.
HTML Attributes
There are around 170 HTML Attributes that we use. List of all HTML Attributes is given below.
-
accept attribute
It is used for input tag (only for type="file"), it tells about the type of files that the website server accepts or user can upload.
-
accept-charset attribute
It is used for form tag, It specifies the character encodings that are to be used for the submission of form.
-
accesskey attribute
It defines a short key to activate or focus an element.
-
action attribute
It is used for form tag, It tells where to send the submitted form data that user has input.
-
align attribute
It is not supported in HTML 5, It was used to specify the alignment with respect to surrounding elements but we use CSS for that now.
-
alt attribute
It is used for img tag, area tag and input tag. It defines the alternative text if the element doesn't display.
-
async attribute
It is used for script tag, It tells that script is executed asynchronously.
-
autocomplete attribute
It is used for form tag, input tag. It's value is on. It enables the browser to display previously typed text, so you don't have to write it again and again.
-
autofocus attribute
It is used for button tag, input tag, select tag and textarea tag. It enables element to automatically get focused when the page loads.
-
autoplay attribute
It is used for audio tag, video tag, It specifies that the audio or video should automatically play after the page is loaded.
-
border attribute
It is not supported in HTML 5, It is used to set width of border, we use CSS instead now.
-
bgcolor attribute
It is not supported in HTML 5, It is used to set background color of element, we use CSS instead now.
-
charset attribute
It is used for meta tag and script tag. It defines the character encoding.
-
checked attribute
It is used for input tag (for type="radio" or type="checkbox"), It specifies the element to be pre-selected.
-
cite attribute
It is used for blockquote tag, del tag, ins tag and q tag. It gives the URL of document which explains the quote, text or data.
-
class attribute
It is a Global Attribute. It defines one or more class names for an element that can be used to style it or can be used to refer to it by JavaScript for various interactive functions.
-
color attribute
It is not supported in HTML 5. It sets the text color of element, but we use CSS for that now.
-
cols attribute
It is used for textarea tag. It defines the width of text area.
-
colspan attribute
It is used for th tag and td tag. It defines the no of columns table cell must have.
-
content attribute
It is used for meta tag. It defines the content type of meta data.
-
contenteditable attribute
It is also a Global Attribute. It defines if the content of Html element is editable or not.
-
controls attribute
It is used for audio tag and video tag. It allows the browser to display the control buttons (like play and pause etc) for the audio or video file.
-
coords attribute
It is used for area tag. It defines the coordinates of the area element.
-
data attribute
It is used for object tag. It defines the URL of the resource that is linked with object.
-
data-* attribute
It is also a Global Attribute. It enables us to embed or store the custom data attributes on all our HTML elements.
-
datetime attribute
It is used for del tag, time tag and ins tag. It sets the date and time on web page.
-
default attribute
It is used for track tag. It is a Boolean attribute, It defines which track is to be enabled if the user doesn't specify the appropriate track.
-
defer attribute
It is used for script tag. It is only used for external script files. It makes sure that the script is only executed after the page parsing is complete.
-
dir attribute
It is used for script tag. It is only used for external script files. It makes sure that the script is only executed after the page parsing is complete.
-
dirname attribute
It is used for input tag, textarea tag. It enables that the direction of text will be submitted.
-
disabled attribute
It is used for button tag, fieldset tag, input tag, optgroup tag, option tag, select tag and textarea tag. It disables the element or group of elements.
-
draggable attribute
It is a Global Attribute. It defines if element is draggable or not.
-
dropzone attribute
It is a Global Attribute. It defines if dragged data is copied, linked or moved when dropped.
-
enctype attribute
It is used for form tag. It specified the encoding method of form data when the form is submitted.
-
face attribute
It defines default font for text but it is not supported in HTML5.
-
for attribute
It is used for label tag and output tag. It defines the link of label or calculation with the element.
-
form attribute
It is used for button tag, fieldset tag, label tag, input tag, meter tag, object tag, output tag, select tag and textarea tag. It specifies which form belongs to the particular element using form name.
-
formaction attribute
It is used for button tag and input tag. It tells where to send the form data when form is submitted. It is only for type="submit".
-
headers attribute
It is used for td tag and th tag. It defines one or more header cells connected to a cell.
-
height attribute
It is used for canvas tag, embed tag, iframe tag, img tag, input tag, object tag and video tag. It sets the height of element.
-
hidden attribute
It is a Global Attribute. It is Boolean attribute, it hides the element.
-
high attribute
It is used for meter tag. It sets the value for meter tag which is considered high.
-
href attribute
It is used for a tag, area tag, base tag and link tag. It sets the URL of web page or document.
-
hreflang attribute
It is used for a tag, area tag and link tag. It defines the Language of web page or document.
-
http-equiv attribute
It is used for meta tag. It defines HTTP response header for the value of the content attribute.
-
id attribute
It is a Global Attribute. It defines a specific id for element. Element id must be unique.
-
ismap attribute
It is used for img tag. It defines an image to be image-map.
-
kind attribute
It is used for track tag. It defines the type of text track.
-
label attribute
It is used for track tag, option tag and optgroup tag. It defines the title of text track.
-
lang attribute
It is a Global Attribute. It defines the language of element's content.
-
list attribute
It is used for input tag. It is used for the datalist element that have pre defined listed options for input element.
-
loop attribute
It is used for audio tag and video tag. It defines that audio or video file will repeat every time after it's finished.
-
low attribute
It is used for meter tag. It defines the range for meter element that sets the value which is considered low.
-
max attribute
It is used for input tag, meter tag and progress tag. It defines the maximum value.
-
maxlength attribute
It is used for input tag and textarea tag. It specifies the maximum no of characters that are allowed for input tag or textarea tag.
-
media attribute
It is used for a tag, area tag, link tag, source tag and style tag. It explains that which device is optimal for the linked web page or document.
-
method attribute
It is used for form tag. It defines which method to use while submitting the form data. Two main methods are Post and Get.
-
min attribute
It is used for input tag and meter tag. It defines the minimum value.
-
multiple attribute
It is used for input tag and select tag. It enables the user to enter more than values for input type elements.
-
muted attribute
It is used for audio tag and video tag. It makes the audio and video file silent, the sound will be muted.
-
name attribute
It is used for button tag, fieldset tag, form tag, iframe tag, input tag, map tag, meta tag, object tag, output tag, param tag, select tag and textarea tag. It defines the name of the element.
-
novalidate attribute
It is used for form tag. It defines the form should be submitted without validation.
-
onabort attribute
It is used for audio tag, video tag, embed tag, img tag and object tag. It defines that the script must always run on abort.
-
onafterprint attribute
It is used for body tag. It defines that the script must always run after the desired document is printed.
-
onbeforeprint attribute
It is used for body tag. It defines that the script must always run before the desired document is printed.
-
onbeforeunload attribute
It is used for body tag. It defines that the script must always run before the time when document is unloaded.
-
onblur attribute
It is used for All Visible Elements. It defines that script will run once the element is out of focus.
-
oncanplay attribute
It is used for audio tag, video tag, embed tag and object tag. It defines that script will run once the file has buffered to the limit that it can start playing.
-
oncanplaythrough attribute
It is used for audio tag and video tag. It defines that script will run once the file has buffered completely.
-
oncanplaythrough attribute
It is used for audio tag and video tag. It defines that script will run once the file has buffered completely so that file can play without any pause.
-
onchange attribute
It is used for All Visible Elements. It defines that script will run if the value of element is changed.
-
onclick attribute
It is used for All Visible Elements. It defines that script will run when the element is clicked.
-
oncontextmenu attribute
It is used for All Visible Elements. It defines that script will run when the context menu is triggered or initiated.
-
oncopy attribute
It is used for All Visible Elements. It defines that script will run when the content of element is copied.
-
oncuechange attribute
It is used for track tag. It defines that script will run when the cue is changed.
-
oncut attribute
It is used for All Visible Elements. It defines that script will run when the content of element is being cut.
-
ondblclick attribute
It is used for All Visible Elements. It defines that script will run when the element is double clicked.
-
ondrag attribute
It is used for All Visible Elements. It defines that script will run when the element is dragged.
-
ondragend attribute
It is used for All Visible Elements. It defines that script will run when the element is dragged till the end.
-
ondragenter attribute
It is used for All Visible Elements. It defines that script will run when the element is dragged till a particular target or point.
-
ondragleave attribute
It is used for All Visible Elements. It defines that script will run when the element leaves a particular target or point while being dragged.
-
ondragover attribute
It is used for All Visible Elements. It defines that script will run when the element is dragged over a particular target or point.
-
ondragstart attribute
It is used for All Visible Elements. It defines that script will run when the dragging process of element has just started.
-
ondrop attribute
It is used for All Visible Elements. It defines that script will run when the element is being dropped.
-
ondurationchange attribute
It is used for audio tag and video tag. It defines that script will run when the length of media file changes.
-
onemptied attribute
It is used for audio tag and video tag. It defines that script will run when the file is suddenly not available due to the disconnection or something.
-
onended attribute
It is used for audio tag and video tag. It defines that script will run when the file has reached the end, usually a greeting message.
-
onerror attribute
It is used for audio tag. body tag, embed tag, img tag, object tag, script tag, style tag and video tag. It defines that script will run if the error occurs.
-
onfocus attribute
It is used for All Visible Elements. It defines that script will run when the element gets focused.
-
onhashchange attribute
It is used for body tags. It defines that script will run when the anchor part of URL is changed.
-
oninput attribute
It is used for All Visible Elements. It defines that script will run when user will enter some input for element.
-
oninvalid attribute
It is used for All Visible Elements. It defines that script will run when the element is invalid.
-
onkeydown attribute
It is used for All Visible Elements. It defines that script will run when the user is pressing a key.
-
onkeypress attribute
It is used for All Visible Elements. It defines that script will run when the user presses a key.
-
onkeyup attribute
It is used for All Visible Elements. It defines that script will run when the user releases a key.
-
onload attribute
It is used for body tag, img tag, iframe tag, input tag, link tag, script tag and style tag. It defines that script will run when the element is loaded completely.
-
onloadeddata attribute
It is used for audio tag and video tag. It defines that script will run when the file is loaded.
-
onloadedmetadata attribute
It is used for audio tag and video tag. It defines that script will run when the meta data of file is loaded.
-
onloadstart attribute
It is used for audio tag and video tag. It defines that script will run as soon as the file has started loading.
-
onmousedown attribute
It is used for All Visible Elements. It defines that script will run when the mouse button is pressed.
-
onmousemove attribute
It is used for All Visible Elements. It defines that script will run when the pointer of mouse is moving over element.
-
onmouseout attribute
It is used for All Visible Elements. It defines that script will run when the pointer of mouse is moving out of element.
-
onmouseover attribute
It is used for All Visible Elements. It defines that script will run when the pointer of mouse moves over an element.
-
onmouseup attribute
It is used for All Visible Elements. It defines that script will run when the pointer of mouse is released over an element.
-
onmousewheel attribute
It is used for All Visible Elements. It defines that script will run when the mouse wheel is scrolled over any element.
-
onoffline attribute
It is used for body tag. It defines that script will run when the browser works offline or there is no connection.
-
ononline attribute
It is used for body tag. It defines that script will run when the browser works online or the connection is reestablished.
-
onpagehide attribute
It is used for body tag. It defines that script will run when the user navigates away from the page.
-
onpageshow attribute
It is used for body tag. It defines that script will run when the user navigates to the page.
-
onpaste attribute
It is used for All Visible Elements. It defines that script will run when the user paste something to the element.
-
onpaste attribute
It is used for All Visible Elements. It defines that script will run when the user paste something to the element.
-
onpause attribute
It is used for audio tag and video tag. It defines that script will run when the media pauses by the user or due to any other reason.
-
onplay attribute
It is used for audio tag and video tag. It defines that script will run when the media starts playing.
-
onplaying attribute
It is used for audio tag and video tag. It defines that script will run when the media is playing.
-
onpopstate attribute
It is used for body tag. It defines that script will run when the window's history is changed.
-
onprogress attribute
It is used for audio tag and video tag. It defines that script will run when the browser is getting the media data.
-
onratechange attribute
It is used for audio tag and video tag. It defines that script will run when the user changes the speed of media i.e slow motion and fast motion.
-
onreset attribute
It is used for form tag. It defines that script will run when the reset button of the form is clicked.
-
onresize attribute
It is used for body tag. It defines that script will run when the browser size is changed.
-
onscroll attribute
It is used for All Visible Elements. It defines that script will run when the scroll bar of element is resized.
-
onsearch attribute
It is used for input tag (for input="search"). It defines that script will run when the user writes something in the search field.
-
onseeked attribute
It is used for audio tag and video tag. It defines that script will run when the process of seeking is ended.
-
onseeking attribute
It is used for audio tag and video tag. It defines that script will run when the process of seeking is still going on.
-
onselect attribute
It is used for All Visible Elements. It defines that script will run when the element gets selected.
-
onstalled attribute
It is used for audio tag and video tag. It defines that script will run when the media data is stuck and browser is unable to fetch it.
-
onstorage attribute
It is used for body tag. It defines that script will run whenever the Web storage area is updated.
-
onsubmit attribute
It is used for form tag. It defines that script will run when the form is submitted.
-
onsuspend attribute
It is used for audio tag and video tag. It defines that script will run when the process of fetching the media is stopped due to any reason.
-
ontimeupdate attribute
It is used for audio tag and video tag. It defines that script will run when the playing position is changed by the user i.e forwards the media to specific point or reverse it.
-
ontoggle attribute
It is used for details tag. It defines that script will run when the user opens or closes the details element.
-
onunload attribute
It is used for body tag. It defines that script will run when the page is unloaded.
-
onvolumechange attribute
It is used for audio tag and video tag. It defines that script will run when the volume of audio or video media file is changed.
-
onwaiting attribute
It is used for audio tag and video tag. It defines that script will run when media file is paused due to buffering or due to any other reason.
-
onwheel attribute
It is used for All Visible Elements. It defines that script will run when the mouse wheel rolls up or down.
-
open attribute
It is used for details tag. It defines that details element should not be hidden.
-
optimum attribute
It is used for meter tag. It defines the value which is optimum for the gauge.
-
pattern attribute
It is used for input tag. It defines expression or pattern for input tag and is checked against it.
-
placeholder attribute
It is used for input tag and textarea tag. It displays the short hint or text for the user to tell what to enter as input.
-
poster attribute
It is used for video tag. It defines the image that will be displayed when the video is not played yet or it's downloading.
-
preload attribute
It is used for audio tag and video tag. It defines how the video or file should load when the page is loaded.
-
readonly attribute
It is used for input tag and textarea tag. It defines that element is read-only element.
-
rel attribute
It is used for link tag, a tag and area tag. It defines the relationship of linked document or file with the current file.
-
required attribute
It is used for input tag, select tag and textarea tag. It defines that the form cannot be submitted without entering these values.
-
reversed attribute
It is used for ol tag. It defines that the list items must be in descending order.
-
rows attribute
It is used for textarea tag. It defines the no of lines in textarea element.
-
rows attribute
It is used for textarea tag. It defines the no of lines in textarea element.
-
rowspan attribute
It is used for td tag and th tag. It defines the no rows of the cell of table.
-
sandbox attribute
It is used for iframe tag. It defines the restriction for the iframe content.
-
scope attribute
It is used for th tag. It defines if the header cell is header for rows column or group of row or columns.
-
selected attribute
It is used for option tag. It defines that the particular option must be selected when the page loads.
-
shape attribute
It is used for area tag. It defines the shape of area.
-
size attribute
It is used for input tag and select tag. It defines the size of input for the input tag (in characters) and the the no of visible options for select tag.
-
sizes attribute
It is used for img tag, link tag and source tag. It defines the size of the linked document file or resource.
-
span attribute
It is used for col tag and colgroup tag. It defines the number of columns to span.
-
spellcheck attribute
It is used for Global Attributes. It enables the element to be able to check the grammar and spelling of it's content.
-
src attribute
It is used for audio tag, embed tag, iframe tag, img tag, input tag, script tag, source tag, track tag and video tag. It defines the url of the file.
-
srcdoc attribute
It is used for iframe tag. It defines the HTML content of page which is to be shown in iframe tag.
-
srclang attribute
It is used for track tag. It defines the language of the text track data if kind is set to subtitles.
-
srcset attribute
It is used for img tag and source tag. It defines the url of image to be used in different situations.
-
start attribute
It is used for ol tag. It defines the start value of an ordered list.
-
step attribute
It is used for input tag. It defines the allowed number intervals for an input tag.
-
style attribute
It is used for Global Attributes. It defines the inline styles of all HTML elements to change their style.
-
tabindex attribute
It is used for Global Attributes. It defines the tabbing order of element.
-
target attribute
It is used for a tag, area tag, base tag and form tag. It defines the target of where to open the linked document or page or file and also where to submit the form.
-
title attribute
It is used for Global Attributes. It defines the extra information about element.
-
translate attribute
It is used for Global Attributes. It defines if the content of an element should be translated or not
-
type attribute
It is used for a tag, embed tag, button tag, link tag, menu tag, object tag, source tag, script tag, input tag and style tag. It defines the type of element.
-
usemap attribute
It is used for img tag and object tag. It defines the image as image map.
-
value attribute
It is used for li tag, meter tag, button tag progress tag, option tag, input tag and param tag. It defines the value of element.
-
width attribute
It is used for canvas tag, embed tag, iframe tag, img tag, object tag, input tag and video tag. It defines the width of element.
-
wrap attribute
It is used for textarea tag. It defines how to wrap the text when form is submitted in textarea tag.
HTML Ordered List
HTML Ordered List is used when the ordered of list items is important. In HTML ordered list the list items are marked with numbers by default. The syntax of HTML Ordered List is shown below.
<ol>
<li>First Item</li>
<li>Second Item</li>
<li>Third Item</li>
</ol>
HTML Unordered List
HTML Unordered List is used to list the items in bulleted form. You can also customize the bullets. HTML unordered list is used when the order of list items is not important.
<ul>
<li>First Item</li>
<li>Second Item</li>
<li>Third Item</li>
</ul>
HTML Definition List
HTML Definition List is used to define the description list. A description list is a list which contain the definition of each and every item or term.
<dl>
<dt>Item</dt>
<dd>Item Definition</dd>
</dl>
HTML Table
The structure of HTML Table is shown below. The HTML Table contains the body and head sections.
<table>
<thead>
<tr>
<th>Name</th>
<th>Percentage</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tom</td>
<td>80%</td>
</tr>
<tr>
<td>Harry</td>
<td>85%</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Marks</td>
<td>Percentage</td>
</tr>
</tfoot>
</table>
HTML Forms
HTML Form is used to get information from the user, it has the form elements like input elements, checkboxes, radio buttons, text fields, select elements and more.
<form action="/action.php" method="post">
<label>Name:</label>
<input name="name" type="text" />
<label>Age:</label>
<input name="age" type="number" value="18" />
<label>Gender:</label>
<select name="gender">
<option selected="selected" value="male">Male</option>
<option value="female">Female</option>
</select>
<label>Comments:</label>
<textarea cols="20" name="comments" rows="5">Comment</textarea>
<input type="submit" value="Submit" />
</form>
HTML Characters and Symbols
HTML Math Symbols
There are 256 HTML Math Symbols and Operators, The HTML Math Symbols Character Codes are listed in decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
∀ | 8704 | 2200 | For All | |
∁ | 8705 | 2201 | Complement | |
∂ | 8706 | 2202 | Partial Differential | |
∃ | 8707 | 2203 | There Exists | |
∄ | 8708 | f2204 | There Does Not Exist | |
∅ | 8709 | 2205 | Empty Set | |
∆ | 8710 | 2206 | Increment | |
∇ | 8711 | 2207 | Nabla | |
∈ | 8712 | 2208 | Element Of | |
∉ | 8713 | 2209 | Not An Element Of | |
∊ | 8714 | 220A | Smart Element Of | |
∋ | 8715 | 220B | Contains As Members | |
∌ | 8716 | 220C | Does Not Contain As Members | |
∍ | 8717 | 220D | Small Contains As Members | |
∎ | 8718 | 220E | End Of Proof | |
∏ | 8719 | 220F | N-ARY Product | |
∐ | 8720 | 2210 | N-ARY Coproduct | |
∑ | 8721 | 2211 | N-ARY Summation | |
− | 8722 | 2212 | Minus | |
∓ | 8723 | 2213 | Minus Or Plus Sign |
Learn more about HTML Math Symbols.
HTML Smiley Face Codes
There are 56 HTML Smiley Face Codes, The HTML Smiley Face Codes are listed in both decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
😀 | 128512 | 1F600 | Grinning Face | |
😁 | 128513 | 1F601 | Grinning Face With Smilling Eyes | |
😂 | 128514 | 1F602 | Face With Tears of Joy | |
😃 | 128515 | 1F603 | Smiling Face With Open Mouth | |
😄 | 128516 | 1F604 | Smiling Face With Open Mouth and Smiling Eyes | |
😅 | 128517 | 1F605 | Smiling Face With Open Mouth And Cold Sweat | |
😆 | 128518 | 1F606 | Smiling Face With Open Mouth And Tightly Closed Eyes | |
😇 | 128519 | 1F607 | Smiling Face With Halo | |
😈 | 128520 | 1F608 | Smiling Face With Horns | |
😉 | 128521 | 1F609 | Winking Face | |
😊 | 128522 | 1F60A | Smiling Face With Smiling Eyes | |
😋 | 128523 | 1F60B | Face Savouring Delicious Food | |
😌 | 128524 | 1F60C | Relieved Face | |
😍 | 128525 | 1F60D | Smiling Face With Heart Shaped Eyes | |
😎 | 128526 | 1F60E | Smiling Face With Sunglasses | |
😏 | 128527 | 1F60F | Smirking Face | |
😐 | 128528 | 1F610 | Neutral Face | |
😑 | 128529 | 1F611 | Expressionless Face | |
😒 | 128530 | 1F612 | Unamused Face | |
😓 | 128531 | 1F613 | Face With Cold Sweat |
Learn more about HTML Smiley Face Codes.
HTML Punctuation Codes
There are 111 HTML Punctuation, The HTML Punctuation Codes are listed in decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
8192 | 2000 | En Quad | ||
8193 | 2001 | Em Quad | ||
8194 | 2002 | En Space | ||
8195 | 2003 | Em Space | ||
8196 | 2004 | Three Per Em Space | ||
8197 | 2005 | Four Per Em Space | ||
8198 | 2006 | Six Per Em Space | ||
8199 | 2007 | Figure Space | ||
8200 | 2008 | Punctuation Space | ||
8201 | 2009 | Thin Space | ||
8202 | 200a | Hair Space | ||
| 8203 | 200b | Zero Width Space | |
| 8204 | 200c | Zero Width Non Joiner | |
| 8205 | 200d | Zero Width Joiner | |
| 8206 | 200e | Left To Right Mark | |
| 8207 | 200f | Right To Left Mark | |
‐ | 8208 | 2010 | Hyphen | |
‑ | 8209 | 2011 | Non Breaking Hyphen | |
‒ | 8210 | 2012 | Figure Dash | |
– | 8211 | 2013 | En Dash |
Learn more about HTML Punctuation Codes.
HTML Currency Symbols Code
There are 32 HTML Currency Symbols, The HTML Currency Symbol Codes are listed in decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
₠ | 8352 | 20A0 | Euro Currency Sign | |
₡ | 8353 | 20A1 | Colon Sign | |
₢ | 8354 | 20A2 | Cruzeiro Sign | |
₣ | 8355 | 20A3 | French Franc Sign | |
₤ | 8356 | 20A4 | Lira Sign | |
₥ | 8357 | 20A5 | Mill Sign | |
₦ | 8358 | 20A6 | Naira Sign | |
₧ | 8359 | 20A7 | Peseta Sign | |
₨ | 8360 | 20A8 | Rupee Sign | |
₩ | 8361 | 20A9 | Won Sign | |
₪ | 8362 | 20AA | New Sheqel Sign | |
₫ | 8363 | 20AB | Dong Sign | |
€ | 8364 | 20AC | Euro Sign | |
₭ | 8365 | 20AD | Kip Sign | |
₮ | 8366 | 20AE | Tugrik Sign | |
₯ | 8367 | 20AF | Drachma Sign | |
₰ | 8368 | 20B0 | Germany Penny Symbol | |
₱ | 8369 | 20B1 | Peso Sign | |
₲ | 8370 | 20B2 | Guarani Sign | |
₳ | 8371 | 20B3 | Austral Sign |
Learn more about HTML Currency Symbols Code.
HTML Geometric Shapes Codes
There are 96 HTML Geometric Shapes, The HTML Geometric Shape Codes are listed in both decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
■ | 9632 | 25A0 | Black Square | |
□ | 9633 | 25A1 | White Square | |
▢ | 9634 | 25A2 | White Square With Rounded Corners | |
▣ | 9635 | 25A3 | White Square Containing Black Small Square | |
▤ | 9636 | 25A4 | Square With Horizontal Fill | |
▥ | 9637 | 25A5 | Square With Vertical Fill | |
▦ | 9638 | 25A6 | Square With Orthogonal Crosshatch | |
▧ | 9639 | 25A7 | Square With Upper Left To Lower Right Fill | |
▨ | 9640 | 25A8 | Square With Upper Right To Lower Left Fill | |
▩ | 9641 | 25A9 | Square With Diagonal Crosshatch Fill | |
▪ | 9642 | 25AA | Black Small Square | |
▫ | 9643 | 25AB | White Small Square | |
▬ | 9644 | 25AC | Black Rectangle | |
▭ | 9645 | 25AD | White Rectangle | |
▮ | 9646 | 25AE | Black Vertical Rectangle | |
▯ | 9647 | 25AF | White Vertical Rectangle | |
▰ | 9648 | 25B0 | Black Parallelogram | |
▱ | 9649 | 25B1 | White Parallelogram | |
▲ | 9650 | 25B2 | Black Up Pointing Triangle | |
△ | 9651 | 25B3 | White Up Pointing Triangle |
Learn more about HTML Geometric Shapes Codes.
HTML Dingbat Symbols
There are 191 HTML Dingbat Symbols, The HTML Dingbat Symbols Codes are listed in both decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
✁ | 9985 | 2701 | Upper Blade Scissors | |
✂ | 9986 | 2702 | Black Scissors | |
✃ | 9987 | 2703 | Lower Blade Scissors | |
✄ | 9988 | 2704 | White Scissors | |
✅ | 9989 | 2705 | White Heavy Check Mark | |
✆ | 9990 | 2706 | Telephone Location Sign | |
✇ | 9991 | 2707 | Tape Drive | |
✈ | 9992 | 2708 | Airplane | |
✉ | 9993 | 2709 | Envelope | |
✊ | 9994 | 270A | Raised Fist | |
✋ | 9995 | 270B | Raised Hand | |
✌ | 9996 | 270C | Victory Hand | |
✍ | 9997 | 270D | Writing Hand | |
✎ | 9998 | 270E | Lower Right Pencil | |
✏ | 9999 | 270F | Pencil | |
✐ | 10000 | 2710 | Upper Right Pencil | |
✑ | 10001 | 2711 | White Nib | |
✒ | 10002 | 2712 | Black Nib | |
✓ | 10003 | 2713 | Check Mark | |
✔ | 10004 | 2714 | Heavy Check Mark |
Learn more about HTML Dingbat Symbols.
HTML Letter Symbols Codes
There are 81 HTML Letter Symbols, The HTML Letter Symbol Codes are listed in decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
℀ | 8448 | 2100 | Account Of | |
℁ | 8449 | 2101 | Addressed To The Subject | |
ℂ | 8450 | 2102 | Double Struck Capital C | |
℃ | 8451 | 2103 | Degree Celsius | |
℄ | 8452 | 2104 | Center Line Symbol | |
℅ | 8453 | 2105 | Care Of | |
℆ | 8454 | 2106 | Cada Una | |
ℇ | 8455 | 2107 | Euler Constant | |
℈ | 8456 | 2108 | Scruple | |
℉ | 8457 | 2109 | Degree Fahrenheit | |
ℊ | 8458 | 210A | Script Small G | |
ℋ | 8459 | 210B | Script Small H | |
ℌ | 8460 | 210C | Black Letter Capital H | |
ℍ | 8461 | 210D | Double Struck Capital H | |
ℎ | 8462 | 210E | Planck Constant | |
ℏ | 8463 | 210F | Planck Constant Over Two PI | |
ℐ | 8464 | 2110 | Script Capital I | |
ℑ | 8465 | 2111 | Black Letter Capital I | |
ℒ | 8466 | 2112 | Script Capital L | |
ℓ | 8467 | 2113 | Script Small L |
Learn more about HTML Letter Symbols Codes.
HTML Arrow Symbols
There are 112 HTML Arrow Symbols, The HTML Arrow Character Codes are listed in decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
← | 8592 | 2190 | Left Arrow | |
↑ | 8593 | 2191 | Up Arrow | |
→ | 8594 | 2192 | Right Arrow | |
↓ | 8595 | 2193 | Down Arrow | |
↔ | 8596 | 2194 | Left Right Arrow | |
↕ | 8597 | 2195 | Up Down Arrow | |
↖ | 8598 | 2196 | North West Arrow | |
↗ | 8599 | 2197 | North East Arrow | |
↘ | 8600 | 2198 | South East Arrow | |
↙ | 8601 | 2199 | South West Arrow | |
↚ | 8602 | 219A | Leftwards Arrow With Stroke | |
↛ | 8603 | 219B | Rightwards Arrow With Stroke | |
↜ | 8604 | 219C | Leftwards Wave Arrow | |
↝ | 8605 | 219D | Rightwards Wave Arrow | |
↞ | 8606 | 219E | Leftwards Two Headed Arrow | |
↟ | 8607 | 219F | Upwards Two Headed Arrow | |
↠ | 8608 | 21A0 | Rightwards Two Headed Arrow | |
↡ | 8609 | 21A1 | Downwards Two Headed Arrow | |
↢ | 8610 | 21A2 | Leftwards Arrow With Tail | |
↣ | 8611 | 21A3 | Rightwards Arrow With Tail |
Learn more about HTML Arrow Symbols.
Block Elements Codes
There are 32 Block Elements, The Block Elements Codes are listed in both decimal and hexadecimal form.
Character | Decimal | Hexdecimal | Name | Action |
---|---|---|---|---|
▀ | 9600 | 2580 | Upper Half Block | |
▁ | 9601 | 2581 | Lower One Eighth Block | |
▂ | 9602 | 2582 | Lower One Quarter Block | |
▃ | 9603 | 2583 | Lower Three Eighths Block | |
▄ | 9604 | 2584 | Lower Half Block | |
▅ | 9605 | 2585 | Lower Five Eighths Block | |
▆ | 9606 | 2586 | Lower Three Quarters Block | |
▇ | 9607 | 2587 | Lower Seven Eighths Block | |
█ | 9608 | 2588 | Full Block | |
▉ | 9609 | 2589 | Left Seven Eighths Block | |
▊ | 9610 | 258A | Left Three Quarters Block | |
▋ | 9611 | 258B | Left Five Eighths Block | |
▌ | 9612 | 258C | Left Half Block | |
▍ | 9613 | 258D | Left Three Eighths Block | |
▎ | 9614 | 258E | Left One Quarter Block | |
▏ | 9615 | 258F | Left One Eighth Block | |
▐ | 9616 | 2590 | Right Half Block | |
░ | 9617 | 2591 | Light Shade | |
▒ | 9618 | 2592 | Medium Shade | |
▓ | 9619 | 2593 | Dark Shade |
Learn more about Block Elements Codes.