Curriculum
Creating an HTML page is easy, even if you have no prior programming experience. In this lesson, we’ll walk you through the process of creating your first HTML page step-by-step.
Before you start creating your HTML page, you’ll need to set up a development environment. Here’s what you’ll need:
Once you have a text editor and a web browser, you’re ready to create your first HTML page.
Here’s how to create your first HTML page:
<!DOCTYPE html> <html> <head> <title>My First HTML Page</title> </head> <body> <h1>Hello, World!</h1> <p>This is my first HTML page.</p> </body> </html>
This code creates a basic HTML page with a heading (<h1>) and a paragraph (<p>) of text.
Let’s take a closer look at the HTML code we just created:
<!DOCTYPE html>
: This is the document type declaration, which tells the web browser that this is an HTML5 document.<html>
: This is the opening tag for the HTML document.<head>
: This is the section of the document that contains metadata, such as the title of the page.<title>
: This tag defines the title of the HTML page, which is displayed in the browser’s title bar.</head>
: This is the closing tag for the head section.<body>
: This is the section of the document that contains the content of the page.<h1>
: This tag defines a heading level 1, which is typically used for the main heading of a page.</h1>
: This is the closing tag for the h1 heading.<p>
: This tag defines a paragraph of text.</p>
: This is the closing tag for the paragraph.