A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-course-first-web-page-printing-hello-world/ below:

First Web Page Printing Hello World

First Web Page Printing Hello World

Last Updated : 11 Jul, 2025

So far, we have already learned about the structure of an HTML document, tags, etc in the previous module. Let us use this knowledge to create our first web page.

Here, we are creating a simple webpage that displays a "Hello World" message as the perfect starting point. This exercise will help you understand the foundational structure of HTML and introduce you to headings from <h1> to <h6>.

Why Start with "Hello World"?

"Hello World" is the first step in programming across many languages. By displaying this simple message, you’ll learn how to structure an HTML document and see how headings affect the organization and readability of content on a webpage.

Steps to Create Your First "Hello World" Web Page

Here’s how to build your first webpage in HTML, step-by-step.

Step 1: Open a Text Editor

To create HTML, you need a text editor. You can use:

Step 2: Write the HTML Code

In your text editor, create a file named index.html and write the following HTML code. This code will display "Hello World".

HTML
<!DOCTYPE html>
<html>

<head>
    <title>First Web Page</title>
</head>

<body>
    Hello World!
</body>

</html>

In this Example:

Heading Tags: There are six levels of headings defined by HTML. These six heading elements are h1, h2, h3, h4, h5, and h6; with h1 being the highest level and h6 the least.

Let us use these six different Heading tags separately to print "Hello World!" and see the difference. Modify your code in index.html with the below code: 

Code: index.html

HTML
<html>
<body>
    <h1>Hello World!</h1>
    <h2>Hello World!</h2>
    <h3>Hello World!</h3>
    <h4>Hello World!</h4>
    <h5>Hello World!</h5>
    <h6>Hello World!</h6>
</body>
</html>

To learn more about Heading Tags, Please refer: HTML | Heading.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4