Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • HTML Tutorial
  • HTML Exercises
  • HTML Tags
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • HTML DOM
  • DOM Audio/Video
  • HTML 5
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter
Open In App

HTML5 Complete Reference

Last Updated : 18 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

HTML (HyperText Markup Language) is the standard language used to create and design web pages. It defines the structure and layout of a webpage using a series of elements and tags.

  • HTML5 is the latest version of HTML, bringing significant improvements for building modern web applications.
  • It introduces new semantic elements like <header>, <footer>, and <article> for better content organization.
  • HTML5 supports APIs, improved multimedia handling with <audio> and <video>, and a more robust Document Object Model (DOM) for interactive web experiences.
html
<!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>HTML5 Example - 2025</title>     <style>         body {             font-family: Arial, sans-serif;             text-align: center;             margin-top: 50px;         }         h1 {             color: #2c3e50;         }         p {             color: #34495e;         }     </style> </head> <body>     <h1>Welcome to HTML5!</h1>     <p>The current year is 2025.</p> </body> </html> 
  • HTML5 Structure: This example shows a basic HTML5 document structure with a <!DOCTYPE html> declaration, <head>, and <body> sections.
  • Inline CSS Styling: The <style> block within the <head> section applies simple styles to the body, heading, and paragraph elements, enhancing the presentation without external CSS files.

Features:

  • Introduced multimedia support with <audio> and <video> tags for embedding audio and video.
  • Added new graphic elements like <canvas> for drawing shapes, and support for vector graphics.
  • Improved semantic structure with tags like <header>, <footer>, <article>, <section>, and <figure>.
  • Drag-and-drop functionality allows users to move objects within a page.
  • Geo-location API enables websites to access the user’s geographical location.
  • Web Storage API allows storage of data on the client’s browser for offline access.
  • Supports offline data storage with IndexedDB, a client-side SQL-like database.
  • Enables drawing various shapes (like triangles, rectangles, circles) on the canvas.
  • Better error handling for incorrect syntax, improving code resilience.
  • Simplified DOCTYPE declaration: <!DOCTYPE html> for cleaner document structure.
  • Easy character encoding specification with <meta charset="UTF-8">.

Complete Reference:

Title

Description

HTML5 | IntroductionHTML stands for Hyper Text Markup Language. It is used to design web pages.
HTML5 | EditorsHTML text editors are used to create and modify web pages.
HTML5 | BasicsThere are various tags that we must consider and include while starting to code in HTML.
HTML5 | AttributesAll HTML elements have attributes that will provide additional information about that particular element.

HTML5 | <!DOCTYPE>

<!DOCTYPE> is used to define the document type and declare the version of HTML being used (e.g., HTML5).

HTML5 | ParagraphThe <p> tag in HTML defines a paragraph.
HTML5 | Text FormattingHTML facilitates the ability for formatting text just like we do in any text editing software.
HTML5 | QuotationsThe Quotation elements in HTML are used to insert quoted texts in a web page.
HTML5 | TablesHTML Table is an arrangement of data in rows and columns, or possibly in a more complex structure.
HTML5 | ListsA list is a record of short pieces of related information or used to display the data on web pages in the ordered or unordered form.
HTML5 | Spell CheckThe Spell Check feature in HTML is used to detect grammatical or spelling mistakes in the text fields.
HTML5 | Color Styles and HSLColors are used to make the page more attractive.
HTML5 | GeolocationGeo-location is used to share the location with some websites and be aware of the exact location.
HTML5 | Drag and DropDrag and Drop is a very interactive and user-friendly concept that makes it easier to move an object to a different location by grabbing it.
HTML5 | CharsetsThe character set or character encoding has different character encoding standards which assign some numbers to these character set which can be used in the internet.
HTML5 | ImagesBy adding images, we can make our websites more attractive.
HTML5 | DoctypesA doctype declaration is an instruction that tells the web browser about the markup language in which the current page is written.
HTML5 | LayoutPage layout is the part of graphic design that deals with the arrangement of visual elements on a page.
HTML5 | File PathsA file path specifies the location of a file inside a web folder structure.
HTML5 | IframesThe ”iframe” tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders.
HTML5 | LinksLink is a connection from one web resource to another.
HTML5 | Deprecated TagsThe deprecated tags are those attributes which are replaced by some other attributes.
HTML5 | URL EncodingURL Encoding takes place by replacing all the characters that are not allowed by a % sign followed by two hexadecimal digits.
HTML5 | SVG-BasicsSVG defines vector-based graphics in XML format.
HTML5 | Canvas BasicsThe HTML “canvas” element is used to draw graphics via JavaScript.
HTML5 | Computer Code ElementsThe <code> tag in HTML is used to define the piece of computer code.
HTML5 | EntitiesHTML provides some Entity names and Entity numbers to use symbols which are normally not present in basic keyboard.
HTML5 | canvas drawImage() Methodcanvas drawImage() function is used to display an image or video on canvas.
HTML5 | template TagThe <template> tag in HTML is used to store the HTML code fragments, which can be cloned and inserted in an HTML document.
HTML5 | dropzone AttributeThe dropzone attribute in HTML is used to specify whether the dragged data copied, moved, or linked when it is dropped on any element.
HTML5 | rp TagThe <rp> tag in HTML is used to provide parentheses around a ruby main text which defines the information.
HTML5 | rt TagThe <rt> tag in HTML is used to define the explanation of the ruby annotation which is a small text, attached with the main text.
HTML5 | <ruby> TagThe <ruby> tag in HTML is used to specify the ruby annotation which is a small text, attached with the main text to specify the meaning of the main text.
HTML5 | figure TagThe <figure> tag in HTML is used to add self-contained content like illustrations, diagrams, photos, or codes listing in a document.
HTML5 | figcaption TagThe <figurecaption> tag in HTML is used to set a caption to the figure element in a document.
HTML5 | fieldset TagThe <fieldset> tag in HTML5 is used to make a group of related elements in the form, and it creates the box over the elements.
HTML5 | <head> TagThe <head> tag in HTML is used to define the head portion of the document which contains information related to the document.
HTML5 | <dialog> TagThe <dialog> tag is used to specify the dialog box or window.
HTML5 | <bdi> TagIt differentiates a text from other text that may be formatted in a different direction.
HTML5 | <progress> TagIt is used to represent the progress of a task.
HTML5 | <meter> TagIt is used to define the scale for measurement in a well-defined range and also supports a fractional value.
HTML5 | <wbr> TagIt is used to define the position within the text which is treated as a line break by the browser.
HTML5 | mark TagThe <mark> tag in HTML is used to define the marked text.
HTML5 | <header> TagThe <header> tag in HTML is used to define the header for a document.
HTML5 | <footer> TagThe <footer> tag in HTML is used to define a footer of HTML document.
HTML5 | article tagThe <article> tag is used to represent an article.
HTML5 | <aside> TagThe <aside> tag is used to describe the main object of the web page in a shorter way like a highlighter.
HTML5 | <section> TagSection tag defines the section of documents such as chapters, headers, footers or any other sections.
HTML5 | <summary> TagThe <summary> tag in HTML is used to define a summary for the <details> element.
HTML5 | <details> tagThe <details> tag is used for the content/information which is initially hidden but could be displayed if the user wishes to see it.
HTML5 | SemanticsSemantic elements have meaningful names which tells about type of content.
HTML5 | Mathematical operatorsMathematical Operators are used for representation of mathematical and technical operators.
HTML5 | VideoThe “video” element specifies a standard way to embed a video on a web page.

Best Practices for HTML5

  • Use Semantic Elements: Incorporate HTML5 semantic tags like <header>, <footer>, <article>, and <section> to enhance code readability and improve SEO.
  • Use Proper Document Structure: Always declare the <!DOCTYPE html> at the beginning of your HTML documents to ensure consistent rendering across browsers.
  • Optimize Media Elements: Utilize the <audio> and <video> tags for embedding media, and provide multiple formats to ensure compatibility across different browsers.
  • Implement Responsive Design: Use the <meta name="viewport" content="width=device-width, initial-scale=1.0"> tag and relative units to ensure your website is mobile-friendly and responsive.

V

Vishal_Khoda
Improve
Article Tags :
  • Web Technologies
  • HTML
  • HTML5

Similar Reads

    HTML Tutorial
    HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. It tells the web browser how to display text, links, images, and other forms of multimedia on a webpage. HTML sets up the basic structure of a website, and then CSS and JavaScript
    11 min read
    HTML Introduction
    HTML stands for Hyper Text Markup Language, which is the core language used to structure content on the web. It organizes text, images, links, and media using tags and elements that browsers can interpret. As of 2025, over 95% of websites rely on HTML alongside CSS and JavaScript, making it a fundam
    6 min read
    HTML Editors
    An HTML Editor is a software application designed to help users create and modify HTML code. It often includes features like syntax highlighting, tag completion, and error detection, which facilitate the coding process. There are two main types of HTML editors: Text-Based Editors - Allow direct codi
    5 min read
    HTML Basics
    HTML (HyperText Markup Language) is the standard markup language used to create and structure web pages. It defines the layout of a webpage using elements and tags, allowing for the display of text, images, links, and multimedia content. As the foundation of nearly all websites, HTML is used in over
    6 min read
    HTML Comments
    HTML comments are used to add notes or explanations in the HTML code that are not displayed by the browser.They are useful for documenting the code, making it easier to understand and maintain.To add a comment, use the syntax <!-- your comment here -->. HTML<!-- This is a comment and will n
    4 min read
    HTML Elements
    An HTML Element consists of a start tag, content, and an end tag, which together define the element's structure and functionality. Elements are the basic building blocks of a webpage and can represent different types of content, such as text, links, images, or headings.For example, the <p> ele
    5 min read
    HTML Attributes
    HTML Attributes are special words used within the opening tag of an HTML element. They provide additional information about HTML elements. HTML attributes are used to configure and adjust the element's behavior, appearance, or functionality in a variety of ways. Each attribute has a name and a value
    8 min read
    HTML Headings
    HTML headings are used to define the titles and subtitles of sections on a webpage. They help organize the content and create a structure that is easy to navigate.Proper use of headings enhances readability by organizing content into clear sections.Search engines utilize headings to understand page
    4 min read
    HTML Paragraphs
    A paragraph in HTML is simply a block of text enclosed within the <p> tag. The <p> tag helps divide content into manageable, readable sections. It’s the go-to element for wrapping text in a web page that is meant to be displayed as a distinct paragraph.Syntax:<p> Some Content...
    5 min read
    HTML Text Formatting
    HTML text formatting refers to the use of specific HTML tags to modify the appearance and structure of text on a webpage. It allows you to style text in different ways, such as making it bold, italic, underlined, highlighted, or struck-through. Table of ContentCategories of HTML Text FormattingLogic
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences