HTML Tutorial

  • Last Updated : 28 Sep, 2023

In this HTML tutorial, whether you are a beginner or a professional, this tutorial covers everything you need to know to learn HTML from the basics to advanced. Providing step-by-step instructions for easy learning, it will help you become proficient in HTML.

HTML stands for HyperText Markup Language. It is used to design the web pages. With the help of HTML, you can create a complete website structure. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages and markup language defines the text document within the tag that define the structure of web pages.

HTML Tutorial

HTML Tutorial

Why HTML is used?

HTML is used to create the structure of web pages and website that are displayed on the Internet. HTML basically contains Tags and Attributes that are used to design the web pages. Also, we can link multiple pages using Hyperlinks.

HTML Basic Structure of Web Page

The basic structure of an HTML page is laid out below. It contains the essential building-block elements (i.e. doctype declaration, HTML, head, title, and body elements) upon which all web pages are created.

Page Structure

HTML Page Structure

HTML Basic Tags

  • <DOCTYPE! html> A doctype or document type declaration is an instruction that tells the web browser about the markup language in which the current page is written. It is not an element or tag. The doctype declaration is not case-sensitive.

  • <html> This tag is used to define the root element of HTML document. This tag tells the browser that it is an HTML document. It is the second outer container element that contains all other elements within it.

  • <head> This tag is used to define the head portion of the HTML document that contains information related to the document. Elements within the head tag are not visible on the front-end of a webpage.

  • <body> The body tag is used to enclose all the visible content of a webpage. In other words, the body content is what the browser will show on the front end.

Example: This is the basic example of HTML that display the heading and paragraph content.

HTML

<!DOCTYPE html>
<html>

<!-- Head Section content -->
<head>

    <!-- Page title -->
    <title>Basic Web Page</title>
</head>

<!-- Body Section content -->
<body>

    <!-- Used to display heading content -->
    <h1>Welcome to GeeksforGeeks</h1>

    <!-- Used to display paragrapg content -->
    <p>A computer science portal for geeks</p>
</body>

</html>

Output:

HTML Basic Web Page Output

Complete References

HTML Interview Questions

HTML Practice Quiz Sets

HTML Cheat Sheet

HTML Cheat Sheet is a simple, and quick reference list of basic HTML elements and attributes. The purpose of this Cheat Sheet is to provide you with some quick accurate ready-to-use code snippets and necessary HTML tags and attributes.

HTML Examples

HTML examples contains a wide collection of HTML programming examples. The HTML examples are categorized based on the topics including hyperlinks, forms, tables, frames, and many more.

Learn more about HTML

Recent Articles