Skip to content
Get lifelong access to all courses and certifications with Full Access.
Get lifelong access to all courses and certifications with Full Access.
What is HTML

What is HTML

đź‘‹ Introduction

HTML stands for Hyper Text Markup Language

HTML is the standard markup language for Web pages

HTML elements are the building blocks of HTML pages

HTML elements are represented by <> tags


HTML Elements

An HTML element is a start tag and an end tag with content in between:

<h1>This is a Heading</h1>
Start tag Element content End tag
<h1> This is a Heading </h1>
<p> This is paragraph. </p>

HTML Attributes

  • HTML elements can have attributes
  • Attributes provide additional information about the element
  • Attributes come in name/value pairs like charset="utf-8"

Get started with Front End Development


A Simple HTML Document

<!DOCTYPE html>
<html lang="en">

<meta charset="utf-8">
<title>Page Title</title>

<body>
   <h1>This is a Heading</h1>
   <p>This is a paragraph.</p>
   <p>This is another paragraph.</p>
</body>

</html>

Try it Yourself »

Example Explained

HTML elements are the building blocks of HTML pages.

  • The <!DOCTYPE html> declaration defines this document to be HTML5
  • The <html> element is the root element of an HTML page
  • The lang attribute  defines the language of the document
  • The <meta> element contains meta information about the document
  • The charset attribute defines the character set used in the document
  • The <title> element specifies a title for the document
  • The <body> element contains the visible page content
  • The <h1> element defines a large heading
  • The <p> element defines a paragraph

Want to learn Front End? Try the course made by Meta


HTML Documents

All HTML documents must start with a document type declaration: <!DOCTYPE html>.

The HTML document itself begins with <html> and ends with </html>.

The visible part of the HTML document is between <body> and </body>.


HTML Document Structure

Below is a visualization of an HTML document (an HTML Page):

<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>

Note: Only the content inside the <body> section (the white area above) is displayed in a browser.


HTML Headings

HTML headings are defined with <h1> to <h6> tags.

<h1> defines the most important heading. <h6> defines the least important heading: 

Example

<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>

👇 👇 Want to get started with HTML? Try our course

Subscribe to this blog's RSS feed using https://campus.w3schools.com/blogs/blog.atom

Previous article How to make an accordion
Next article What is SQL

Comments

Shahid Habibi - August 2, 2022

Very good tutorials about HTML.

Yon're a Pirate! - July 29, 2022
Nice page, but not very clear explanation!

Leave a comment

* Required fields