Get real-time assistance with your coding queries. Try AI Help now!




HTML


  1. Tutorials

  2. HTML basics

  3. Introduction to HTML
  4. Introduction to HTML overview
  5. Getting started with HTML
  6. What's in the head? Metadata in HTML
  7. HTML text fundamentals
  8. Creating hyperlinks
  9. Advanced text formatting
  10. Document and website structure
  11. Debuggi#ng HTML
  12. Assessment: Marking up a letter
  13. Assessment: Structuring a page of content

  14. Multimedia and embedding
  15. Multimedia and embedding overview
  16. Images in HTML
  17. Video and audio content
  18. From object to iframe — other embedding technologies
  19. Adding vector graphics to the web
  20. Responsive images
  21. Assessment: Mozilla splash page

  22. HTML tables
  23. HTML tables overview
  24. HTML table basics
  25. HTML table advanced features and accessibility
  26. Assessment: Structuring planet data


  1. References

  2. HTML elements
  3. <a>
  4. <abbr>
  5. <acronym>
  6. <address>
  7. <area>
  8. <article>
  9. <aside>
  10. <audio>
  11. <b>
  12. <base>
  13. <bdi>
  14. <bdo>
  15. <big>
  16. <blockquote>
  17. <body>
  18. <br>
  19. <button>
  20. <canvas>
  21. <caption>
  22. <canter>
  23. <cite>

  24. Global attribute
  25. accesskey
  26. autocapitalize
  27. autofocus
  28. class
  29. contenteditable
  30. data-*
  31. dir
  32. draggable
  33. enterkeyhint
  34. exportparts
  35. hidden
  36. id
  37. inert
  38. inputmode
  39. is
  40. itemid
  41. itemprop
  42. itemref
  43. itemscope
  44. itemtype
  45. lang
  46. nonce
  47. part
  48. popover
  49. slot
  50. spellcheck
  51. style
  52. tabindex
  53. title
  54. translate
  55. virtualkeyboardpolicy

  56. Attributes
  57. accept
  58. autocomplete
  59. capture
  60. crossorigin
  61. dirname
  62. disabled
  63. elementtiming
  64. for
  65. max
  66. maxlength
  67. min
  68. minlength
  69. multiple
  70. pattern
  71. placeholder
  72. readonly
  73. rel
  74. required
  75. size
  76. step

  77. <input> types
  78. <input type="button">
  79. <input type="checkbox">
  80. <input type="color">
  81. <input type="date">
  82. <input type="datetime-local">
  83. <input type="email">
  84. <input type="file">
  85. <input type="hidden">
  86. <input type="image">
  87. <input type="month">
  88. <input type="number">
  89. <input type="password">
  90. <input type="radio">
  91. <input type="range">
  92. <input type="reset">
  93. <input type="search">
  94. <input type="submit">
  95. <input type="tel">
  96. <input type="text">
  97. <input type="time">
  98. <input type="url">
  99. <input type="week">


  1. Guides
  2. Content catagories
  3. Block-level elements
  4. Inline elements
  5. Quirks Mode and Standards Mode
  6. Date and time formats used in HTML
  7. Constraint validation
  8. Microdata
  9. Microformats
  10. Viewport meta tag
  11. Allowing cross-origin use of images and canvas

HTML: HyperText Markup Language

HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (CSS) or functionality/behavior (JavaScriptS).

"Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.

HTML uses "markup" to annotate text, images, and other content for display in a Web browser. HTML markup includes special "elements" such as <head>, <Title>, <body>, <header>, <footer>, <articles>, <section>, <p>, <div>, <span>, <img>, <aside>, <audio>, <canvas>, <datalist>, <details>, <embed>, <nav>, <search>, <output>, <progress>, <video>, <ul>, <ol>, <li>, and many others.

An HTML element is set off from other text in a document by "tags", which consist of the element name surrounded by “<” and “>” . The name of an element inside a tag is case-insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <Title> tag can be written as span <Title>, <Title> or in any other way. However, the convention and recommended practice is to write tags in lowercase.

The articles below can help you learn more about HTML.

Key resources

HTML Introduction

If you're new to web development, be sure to read ourHTML Basics article to learn what HTML is and how to use it.

HTML Tutorials

For articles about how to use HTML, as well as tutorials and complete examples, check out our HTML Learning Area.

HTML Reference

In our extensive HTML reference section, you'll find the details about every element and attribute in HTML.

Beginner's tutorials

Our HTML Learning Area features multiple modules that teach HTML from the ground up — no previous knowledge required.

Introduction to HTML

This module sets the stage, getting you used to important concepts and syntax such as looking at applying HTML to text, how to create hyperlinks, and how to use HTML to structure a web page.

Multimedia and embedding

This module explores how to use HTML to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire other webpages.

HTML tables

Representing tabular data on a webpage in an understandable, accessible way can be a challenge. This module covers basic table markup, along with more complex features such as implementing captions and summaries.

HTML forms

Forms are a very important part of the Web — these provide much of the functionality you need for interacting with websites, e.g. registering and logging in, sending feedback, buying products, and more. This module gets you started with creating the client-side/front-end parts of forms.

Use HTML to solve common problems

Provides links to sections of content explaining how to use HTML to solve very common problems when creating a web page: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc.

Advanced topics

CORS enabled image

The crossorigin attribute, in combination with an appropriate CORS header, allows images defined by the <img> element to be loaded from foreign origins and used in a <canvas> element as if they were being loaded from the current origin.

CORS enabled attributes

Some HTML elements that provide support for CORS, such as <img> or <video>, have a crossorigin attribute (crossOrigin property), which lets you configure the CORS requests for the element's fetched data.

Preloading content with rel="preload"

The preload value of the <link> element's rel attribute allows you to write declarative fetch requests in your HTML <head>, specifying resources that your pages will need very soon after loading, which you therefore want to start preloading early in the lifecycle of a page load, before the browser's main rendering machinery kicks in. This ensures that they are made available earlier and are less likely to block the page's first render, leading to performance improvements. This article provides a basic guide to how preload works.

Reference

HTML reference

HTML consists of elements, each of which may be modified by some number of attributes. HTML documents are connected to each other with links.

HTML element reference

Browse a list of all HTML elements.

HTML attribute reference

Elements in HTML have attributes. These are additional values that configure the elements or adjust their behavior in various ways.

Global attributes

Global attributes may be specified on all HTML elements, even those not specified in the standard. This means that any non-standard elements must still permit these attributes, even though those elements make the document HTML5-noncompliant.

Inline-level elements and block-level elements

HTML elements are usually "inline-level" or "block-level" elements. An inline-level element occupies only the space bounded by the tags that define it. A block-level element occupies the entire space of its parent element (container), thereby creating a "block box".

Guide to media types and formats on the web

The <audio> and <video> elements allow you to play audio and video media natively within your content without the need for external software support.

HTML content categories

HTML is comprised of several kinds of content, each of which is allowed to be used in certain contexts and is disallowed in others. Similarly, each context has a set of other content categories it can contain and elements that can or can't be used in them. This is a guide to these categories.

Quirks mode and standards mode

Historical information on quirks mode and standards mode.

Related topics

Applying color to HTML elements using CSS

This article covers most of the ways you use CSS to add color to HTML content, listing what parts of HTML documents can be colored and what CSS properties to use when doing so. Includes examples, links to palette-building tools, and more.

Help improve MDN

Was this page helpful to you?

Learn how to contribute.
Img is loading...

This page was last modified on Apr 25,2024 by MDN contributors.

In this article