HTML Cheat Sheet

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.

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 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

  1. HTML comment Tag

    The HTML comment tag is used to write comments in main HTML code file. Read More.

  2. HTML doctype Tag

    The Doctype declaration is used to tell the Browser about the version of HTML. Read More.

  3. HTML Tag

    HTML Tag is used to define the root of HTML Document.

  4. HTML head Tag

    HTML Head Tag contains the meta information about the web page.

  5. HTML title Tag

    HTML title Tag is used to define title of web page.

  6. HTML body Tag

    HTML body Tag is used to define the Web Page Body. Read more.

  7. HTML headings Tag (h1 to h6)

    HTML Headings Tag are used to create HTML Headings.

  8. HTML p Tag

    HTML p Tag defines paragraph element.

  9. HTML br Tag

    HTML br Tag is used create a line break in normal flow of content. Read more.

  10. HTML hr Tag

    HTML hr Tag is used to insert a horizontal rule.

Formatting HTML Tags

  1. HTML acronym Tag

    Acronym Tag is like abbr tag. Acronym tag is used to define the abbreviation. Read More.

  2. HTML abbr Tag

    The abbr tag is used to define an abbreviation like HTML, CSS etc. Read More.

  3. HTML address Tag

    The address tag is used to define contact information of the author of a website or document. Read More.

  4. HTML b Tag

    HTML b Tag is used to define the bold text. Read more.

  5. HTML bdi Tag

    HTML bdi Tag is used to write the text with a different direction from other text. Read more.

  6. HTML bdo Tag

    HTML bdo Tag is used to override the text direction. Read more.

  7. HTML big Tag

    HTML big Tag is used to define big text. Read more.

  8. HTML blockquote Tag

    HTML blockquote Tag is used to quote content from some other source. Read more.

  9. HTML center Tag

    HTML center Tag is used to centralize the text.

  10. HTML cite Tag

    HTML cite Tag is used to define the title of the work.

  11. HTML code Tag

    HTML code Tag is used to define the code in document.

  12. HTML del Tag

    HTML del Tag defines the deleted text from the document.

  13. HTML dfn Tag

    HTML dfn Tag is used to define the defining instance of a term.

  14. HTML em Tag

    HTML em Tag defines emphasized text.

  15. HTML font Tag

    HTML font Tag defines font for text.

  16. HTML i Tag

    HTML i Tag is used to define the term that is prominent or different from other text.

  17. HTML ins Tag

    HTML ins Tag is used to define inserted text.

  18. HTML kbd Tag

    HTML kbd Tag is used to define keyboard input.

  19. HTML mark Tag

    HTML mark Tag is used to define highlighted text.

  20. HTML meter Tag

    HTML meter Tag defines scalar measurement.

  21. HTML pre Tag

    HTML pre Tag is used to define pre-formatted text.

  22. HTML progress Tag

    HTML progress Tag is used to represent the progress of particular task.

  23. HTML q Tag

    HTML q Tag is used to define short quotation.

  24. HTML rp Tag

    HTML rp Tag is used to define content to display when ruby annotations are not supported.

  25. HTML rt Tag

    HTML rt Tag defines explanation of characters.

  26. HTML ruby Tag

    HTML ruby Tag is used to define ruby annotation.

  27. HTML s Tag

    HTML s Tag is used to define incorrect text.

  28. HTML samp Tag

    HTML samp Tag is used to define sample output of computer program.

  29. HTML small Tag

    HTML small Tag is used to define smaller text.

  30. HTML strike Tag

    HTML strike Tag is used to define strike-through text.

  31. HTML strong Tag

    HTML strong Tag is used to define important text.

  32. HTML sub Tag

    HTML sub Tag is used to define sub-scripted text.

  33. HTML sup Tag

    HTML sup Tag is used to define super-scripted text.

  34. HTML template Tag

    HTML template Tag is used to define a template.

  35. HTML time Tag

    HTML time Tag is used to define time and date.

  36. HTML tt Tag

    HTML tt Tag is used to define teletype text.

  37. HTML u Tag

    HTML u Tag is used to define text that is different from other text. It is underlined.

  38. HTML var Tag

    HTML var Tag is used to define variable.

  39. HTML wbr Tag

    HTML wbr Tag is used to define possible line break.

Forms and Input Tags

  1. HTML form Tag

    HTML form Tag is used to create Form.

  2. HTML input Tag

    HTML input Tag is used to define Input Element.

  3. HTML textarea Tag

    HTML textarea Tag is used to define a text input element.

  4. HTML button Tag

    HTML button Tag is used to create the HTML button.

  5. HTML select Tag

    HTML select Tag is used to define drop down list.

  6. HTML optgroup Tag

    HTML optgroup Tag defines group of options in drop-down list.

  7. HTML option Tag

    HTML option Tag defines option for select element.

  8. HTML label Tag

    HTML label Tag is used to define label for input element.

  9. HTML legend Tag

    HTML legend Tag is used to define caption for fieldset element.

  10. HTML fieldset Tag

    HTML fieldset Tag defines related elements in a form.

  11. HTML datalist Tag

    HTML datalist Tag defines the input control options list.

  12. HTML output Tag

    HTML output Tag defines result of calculation.

Frame Tags

  1. HTML frame Tag

    HTML frame Tag defines a frame in a frameset.

  2. HTML frameset Tag

    HTML frameset Tag creates set of frames.

  3. HTML iframe Tag

    HTML iframe Tag is used to define frame element.

  4. HTML noframes Tag

    HTML noframes Tag defines alternative content if frames are not supported.

Images Tags

  1. HTML img Tag

    HTML img Tag is used to define Image Content.

  2. HTML map Tag

    HTML map Tag defines image map.

  3. HTML area Tag

    The area tag defines area inside an image map. Read More.

  4. HTML canvas Tag

    HTML canvas Tag is used to draw graphics element using JavaScript.

  5. HTML figcaption Tag

    HTML figcaption Tag defines caption for figure tag.

  6. HTML figure Tag

    HTML figure Tag defines self contained content.

  7. HTML picture Tag

    HTML picture Tag is used to define container for more than one image resources.

  8. HTML svg Tag

    HTML svg Tag is used to define container for SVG graphics.

Audio/Video Tags

  1. HTML audio Tag

    HTML audio Tag is used to define the audio content. Read more.

  2. HTML track Tag

    HTML track Tag is used to define track of media element.

  3. HTML video Tag

    HTML video Tag is used to define video content.

  4. HTML source Tag

    HTML source Tag is used to define media resources for media elements.

  1. HTML anchor Tag

    The anchor tag is used to create hyperlinks on web page. Read More.

  2. HTML link Tag

    HTML link Tag is used to include CSS style sheets.

  3. HTML nav Tag

    HTML nav Tag defines navigation section of web page.

List Tags

  1. HTML ol Tag

    HTML ol Tag defines ordered list.

  2. HTML ul Tag

    HTML ul Tag is used to define unordered list.

  3. HTML li Tag

    HTML li Tag is used to define list item.

  4. HTML dir Tag

    HTML dir Tag defines the directory list.

  5. HTML dl Tag

    HTML dl Tag defines the description list.

  6. HTML dt Tag

    HTML dt Tag defines the term in description list.

  7. HTML dd Tag

    HTML dd Tag defines the description of the term in description list.

Table Tags

  1. HTML table Tag

    HTML table Tag is used to create HTML tables.

  2. HTML caption Tag

    HTML caption Tag is define the table caption.

  3. HTML td Tag

    HTML td Tag is used to define a single cell of table.

  4. HTML tr Tag

    HTML tr Tag is used to define row of table.

  5. HTML th Tag

    HTML th Tag is used to define header cell of table.

  6. HTML tbody Tag

    HTML tbody Tag is used to define body of table.

  7. HTML tfoot Tag

    HTML tfoot Tag is used to define footer of table.

  8. HTML thead Tag

    HTML thead Tag is used to define header of table.

  9. HTML col Tag

    HTML col Tag is used to define column properties for columns in column group.

  10. HTML colgroup Tag

    HTML colgroup Tag is used to define group of columns in table.

Style and Semantic Tags

  1. HTML div Tag

    HTML div Tag defines the container for content.

  2. HTML style Tag

    HTML style Tag is used to write CSS Code.

  3. HTML span Tag

    HTML span Tag is an inline container used to style text.

  4. HTML header Tag

    HTML Header Tag is used to create header section of the document.

  5. HTML footer Tag

    HTML footer Tag defines footer of document or web page.

  6. HTML main Tag

    HTML main Tag defines main content of document.

  7. HTML section Tag

    HTML section Tag is used to define section in document.

  8. HTML article Tag

    HTML article Tag is used for the independent content. Read More.

  9. HTML aside Tag

    HTML aside Tag is used to define the aside content from main content. Read more.

  10. HTML details Tag

    HTML details Tag defines the extra details about content.

  11. HTML dialog Tag

    HTML dialog Tag defines the dialog box.

  12. HTML data Tag

    HTML data Tag is used to define machine readable translation.

  13. HTML summary Tag

    HTML summary Tag is used to define heading for details element.

Meta Tags

  1. HTML meta Tag

    HTML meta Tag defines meta data of HTML Document.

  2. HTML head Tag

    HTML Head Tag contains the meta information about the web page.

  3. HTML base Tag

    HTML base Tag defines the base URL of all the URLS in HTML Document. Read more.

  4. 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

  1. HTML script Tag

    HTML script Tag is used to define script.

  2. HTML noscript Tag

    HTML noscript Tag defines alternative script if some script is not supported.

  3. HTML applet Tag

    The applet tag is used to embed Java applets in HTML. Read More.

  4. HTML embed Tag

    HTML embed Tag defines container for external content.

  5. HTML object Tag

    HTML object Tag defines embedded object.

  6. 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.

  1. 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.

  2. accept-charset attribute

    It is used for form tag, It specifies the character encodings that are to be used for the submission of form.

  3. accesskey attribute

    It defines a short key to activate or focus an element.

  4. action attribute

    It is used for form tag, It tells where to send the submitted form data that user has input.

  5. 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.

  6. alt attribute

    It is used for img tag, area tag and input tag. It defines the alternative text if the element doesn't display.

  7. async attribute

    It is used for script tag, It tells that script is executed asynchronously.

  8. 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.

  9. 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.

  10. 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.

  11. border attribute

    It is not supported in HTML 5, It is used to set width of border, we use CSS instead now.

  12. bgcolor attribute

    It is not supported in HTML 5, It is used to set background color of element, we use CSS instead now.

  13. charset attribute

    It is used for meta tag and script tag. It defines the character encoding.

  14. checked attribute

    It is used for input tag (for type="radio" or type="checkbox"), It specifies the element to be pre-selected.

  15. 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.

  16. 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.

  17. color attribute

    It is not supported in HTML 5. It sets the text color of element, but we use CSS for that now.

  18. cols attribute

    It is used for textarea tag. It defines the width of text area.

  19. colspan attribute

    It is used for th tag and td tag. It defines the no of columns table cell must have.

  20. content attribute

    It is used for meta tag. It defines the content type of meta data.

  21. contenteditable attribute

    It is also a Global Attribute. It defines if the content of Html element is editable or not.

  22. 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.

  23. coords attribute

    It is used for area tag. It defines the coordinates of the area element.

  24. data attribute

    It is used for object tag. It defines the URL of the resource that is linked with object.

  25. data-* attribute

    It is also a Global Attribute. It enables us to embed or store the custom data attributes on all our HTML elements.

  26. datetime attribute

    It is used for del tag, time tag and ins tag. It sets the date and time on web page.

  27. 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.

  28. 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.

  29. 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.

  30. dirname attribute

    It is used for input tag, textarea tag. It enables that the direction of text will be submitted.

  31. 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.

  32. draggable attribute

    It is a Global Attribute. It defines if element is draggable or not.

  33. dropzone attribute

    It is a Global Attribute. It defines if dragged data is copied, linked or moved when dropped.

  34. enctype attribute

    It is used for form tag. It specified the encoding method of form data when the form is submitted.

  35. face attribute

    It defines default font for text but it is not supported in HTML5.

  36. for attribute

    It is used for label tag and output tag. It defines the link of label or calculation with the element.

  37. 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.

  38. 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".

  39. headers attribute

    It is used for td tag and th tag. It defines one or more header cells connected to a cell.

  40. 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.

  41. hidden attribute

    It is a Global Attribute. It is Boolean attribute, it hides the element.

  42. high attribute

    It is used for meter tag. It sets the value for meter tag which is considered high.

  43. href attribute

    It is used for a tag, area tag, base tag and link tag. It sets the URL of web page or document.

  44. hreflang attribute

    It is used for a tag, area tag and link tag. It defines the Language of web page or document.

  45. http-equiv attribute

    It is used for meta tag. It defines HTTP response header for the value of the content attribute.

  46. id attribute

    It is a Global Attribute. It defines a specific id for element. Element id must be unique.

  47. ismap attribute

    It is used for img tag. It defines an image to be image-map.

  48. kind attribute

    It is used for track tag. It defines the type of text track.

  49. label attribute

    It is used for track tag, option tag and optgroup tag. It defines the title of text track.

  50. lang attribute

    It is a Global Attribute. It defines the language of element's content.

  51. list attribute

    It is used for input tag. It is used for the datalist element that have pre defined listed options for input element.

  52. 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.

  53. low attribute

    It is used for meter tag. It defines the range for meter element that sets the value which is considered low.

  54. max attribute

    It is used for input tag, meter tag and progress tag. It defines the maximum value.

  55. 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.

  56. 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.

  57. 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.

  58. min attribute

    It is used for input tag and meter tag. It defines the minimum value.

  59. multiple attribute

    It is used for input tag and select tag. It enables the user to enter more than values for input type elements.

  60. muted attribute

    It is used for audio tag and video tag. It makes the audio and video file silent, the sound will be muted.

  61. 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.

  62. novalidate attribute

    It is used for form tag. It defines the form should be submitted without validation.

  63. 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.

  64. onafterprint attribute

    It is used for body tag. It defines that the script must always run after the desired document is printed.

  65. onbeforeprint attribute

    It is used for body tag. It defines that the script must always run before the desired document is printed.

  66. onbeforeunload attribute

    It is used for body tag. It defines that the script must always run before the time when document is unloaded.

  67. onblur attribute

    It is used for All Visible Elements. It defines that script will run once the element is out of focus.

  68. 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.

  69. oncanplaythrough attribute

    It is used for audio tag and video tag. It defines that script will run once the file has buffered completely.

  70. 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.

  71. onchange attribute

    It is used for All Visible Elements. It defines that script will run if the value of element is changed.

  72. onclick attribute

    It is used for All Visible Elements. It defines that script will run when the element is clicked.

  73. oncontextmenu attribute

    It is used for All Visible Elements. It defines that script will run when the context menu is triggered or initiated.

  74. oncopy attribute

    It is used for All Visible Elements. It defines that script will run when the content of element is copied.

  75. oncuechange attribute

    It is used for track tag. It defines that script will run when the cue is changed.

  76. oncut attribute

    It is used for All Visible Elements. It defines that script will run when the content of element is being cut.

  77. ondblclick attribute

    It is used for All Visible Elements. It defines that script will run when the element is double clicked.

  78. ondrag attribute

    It is used for All Visible Elements. It defines that script will run when the element is dragged.

  79. ondragend attribute

    It is used for All Visible Elements. It defines that script will run when the element is dragged till the end.

  80. 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.

  81. 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.

  82. 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.

  83. ondragstart attribute

    It is used for All Visible Elements. It defines that script will run when the dragging process of element has just started.

  84. ondrop attribute

    It is used for All Visible Elements. It defines that script will run when the element is being dropped.

  85. ondurationchange attribute

    It is used for audio tag and video tag. It defines that script will run when the length of media file changes.

  86. 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.

  87. 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.

  88. 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.

  89. onfocus attribute

    It is used for All Visible Elements. It defines that script will run when the element gets focused.

  90. onhashchange attribute

    It is used for body tags. It defines that script will run when the anchor part of URL is changed.

  91. oninput attribute

    It is used for All Visible Elements. It defines that script will run when user will enter some input for element.

  92. oninvalid attribute

    It is used for All Visible Elements. It defines that script will run when the element is invalid.

  93. onkeydown attribute

    It is used for All Visible Elements. It defines that script will run when the user is pressing a key.

  94. onkeypress attribute

    It is used for All Visible Elements. It defines that script will run when the user presses a key.

  95. onkeyup attribute

    It is used for All Visible Elements. It defines that script will run when the user releases a key.

  96. 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.

  97. onloadeddata attribute

    It is used for audio tag and video tag. It defines that script will run when the file is loaded.

  98. 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.

  99. 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.

  100. onmousedown attribute

    It is used for All Visible Elements. It defines that script will run when the mouse button is pressed.

  101. onmousemove attribute

    It is used for All Visible Elements. It defines that script will run when the pointer of mouse is moving over element.

  102. 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.

  103. onmouseover attribute

    It is used for All Visible Elements. It defines that script will run when the pointer of mouse moves over an element.

  104. 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.

  105. onmousewheel attribute

    It is used for All Visible Elements. It defines that script will run when the mouse wheel is scrolled over any element.

  106. onoffline attribute

    It is used for body tag. It defines that script will run when the browser works offline or there is no connection.

  107. ononline attribute

    It is used for body tag. It defines that script will run when the browser works online or the connection is reestablished.

  108. onpagehide attribute

    It is used for body tag. It defines that script will run when the user navigates away from the page.

  109. onpageshow attribute

    It is used for body tag. It defines that script will run when the user navigates to the page.

  110. onpaste attribute

    It is used for All Visible Elements. It defines that script will run when the user paste something to the element.

  111. onpaste attribute

    It is used for All Visible Elements. It defines that script will run when the user paste something to the element.

  112. 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.

  113. onplay attribute

    It is used for audio tag and video tag. It defines that script will run when the media starts playing.

  114. onplaying attribute

    It is used for audio tag and video tag. It defines that script will run when the media is playing.

  115. onpopstate attribute

    It is used for body tag. It defines that script will run when the window's history is changed.

  116. 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.

  117. 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.

  118. onreset attribute

    It is used for form tag. It defines that script will run when the reset button of the form is clicked.

  119. onresize attribute

    It is used for body tag. It defines that script will run when the browser size is changed.

  120. onscroll attribute

    It is used for All Visible Elements. It defines that script will run when the scroll bar of element is resized.

  121. 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.

  122. onseeked attribute

    It is used for audio tag and video tag. It defines that script will run when the process of seeking is ended.

  123. 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.

  124. onselect attribute

    It is used for All Visible Elements. It defines that script will run when the element gets selected.

  125. 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.

  126. onstorage attribute

    It is used for body tag. It defines that script will run whenever the Web storage area is updated.

  127. onsubmit attribute

    It is used for form tag. It defines that script will run when the form is submitted.

  128. 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.

  129. 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.

  130. ontoggle attribute

    It is used for details tag. It defines that script will run when the user opens or closes the details element.

  131. onunload attribute

    It is used for body tag. It defines that script will run when the page is unloaded.

  132. 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.

  133. 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.

  134. onwheel attribute

    It is used for All Visible Elements. It defines that script will run when the mouse wheel rolls up or down.

  135. open attribute

    It is used for details tag. It defines that details element should not be hidden.

  136. optimum attribute

    It is used for meter tag. It defines the value which is optimum for the gauge.

  137. pattern attribute

    It is used for input tag. It defines expression or pattern for input tag and is checked against it.

  138. 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.

  139. 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.

  140. 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.

  141. readonly attribute

    It is used for input tag and textarea tag. It defines that element is read-only element.

  142. 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.

  143. 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.

  144. reversed attribute

    It is used for ol tag. It defines that the list items must be in descending order.

  145. rows attribute

    It is used for textarea tag. It defines the no of lines in textarea element.

  146. rows attribute

    It is used for textarea tag. It defines the no of lines in textarea element.

  147. rowspan attribute

    It is used for td tag and th tag. It defines the no rows of the cell of table.

  148. sandbox attribute

    It is used for iframe tag. It defines the restriction for the iframe content.

  149. 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.

  150. selected attribute

    It is used for option tag. It defines that the particular option must be selected when the page loads.

  151. shape attribute

    It is used for area tag. It defines the shape of area.

  152. 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.

  153. sizes attribute

    It is used for img tag, link tag and source tag. It defines the size of the linked document file or resource.

  154. span attribute

    It is used for col tag and colgroup tag. It defines the number of columns to span.

  155. 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.

  156. 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.

  157. srcdoc attribute

    It is used for iframe tag. It defines the HTML content of page which is to be shown in iframe tag.

  158. srclang attribute

    It is used for track tag. It defines the language of the text track data if kind is set to subtitles.

  159. srcset attribute

    It is used for img tag and source tag. It defines the url of image to be used in different situations.

  160. start attribute

    It is used for ol tag. It defines the start value of an ordered list.

  161. step attribute

    It is used for input tag. It defines the allowed number intervals for an input tag.

  162. style attribute

    It is used for Global Attributes. It defines the inline styles of all HTML elements to change their style.

  163. tabindex attribute

    It is used for Global Attributes. It defines the tabbing order of element.

  164. 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.

  165. title attribute

    It is used for Global Attributes. It defines the extra information about element.

  166. translate attribute

    It is used for Global Attributes. It defines if the content of an element should be translated or not

  167. 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.

  168. usemap attribute

    It is used for img tag and object tag. It defines the image as image map.

  169. 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.

  170. 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.

  171. 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.

f
Character Decimal Hexdecimal Name Action
8704 2200 For All
8705 2201 Complement
8706 2202 Partial Differential
8707 2203 There Exists
87082204 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.