HTML stands for HyperText Markup Language. It creates a complete website structure of web pages. HTML is a combination of Hypertext and Markup language. Hypertext defines the link between the web pages and markup language defines the text document within the tag. This HTML Tutorial provides basic to advanced concepts for beginners and professionals.
HTML Tutorial
Basic Structure of Web Page
The basic structure of an HTML page is given below. It contains the essential building-block elements (i.e. doctype declaration, HTML, head, title, and body elements) to create web page.
HTML Page Structure
HTML Basic Elements
-
<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> – It is used to define the root element of an 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. It contains information related to the document. Elements within the head tag are not visible on the webpage.
-
<body> – It is used to enclose all visible content of a webpage. In other words, the body content is what the browser will show on the front end.
Example: Basic example of HTML to display the heading and paragraph content.
<!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 paragraph content -->
<p>A computer science portal for geeks</p>
</body>
</html>
|
Output:
Learn HTML
- Tags
- Attributes
- Global Attributes
- Event Attributes
- Canvas
- DOM
- DOM Audio/Video
- HTML5
- MathML
- Questions Complete Reference
Interview Questions
- Beginner Level – Interview Questions and Answers (2024)
- Intermediate Level – Interview Questions and Answers Set (2024)
- Advanced Level – Interview Questions and Answers Set (2024)
Practice Quiz
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.
Examples
HTML examples contain 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
- Introduction
- HTML5 Introduction
- Hex Color Codes
- Charsets
- URL Encoding
- Most commonly used HTML tags
- Structure of HTML Document
- HTML Form Design
- Design your First Website in Just 1 Week
- Simple Portfolio Website Design
- Design a Portfolio Gallery
- Design a web page
- Top 10 Projects For Beginners
- 10 Best HTML Coding Practices You Must Know
- Design a Login Form to an Image using HTML and CSS
Why HTML ?
HTML is used to create the structure of web pages and website that are displayed on the Internet. It basically contains Tags and Attributes that are used to design the web pages. Also, we can link multiple pages using Hyperlinks.

