HTML
Advanced
60 mins
105 points
What you need:

Introduction to HTML

Learn the basics of HTML by creating a simple webpage with headings, paragraphs, and images.

1 - Setting up the HTML file

Open your favorite text editor (like Notepad or Sublime Text) and create a new file. Save it with the name my_first_webpage.html.

2 - Adding the DOCTYPE and HTML tags

Type the following code at the very beginning of your file to declare the document type and add the opening and closing <html></html> tags:

<!DOCTYPE html> <html> </html>

3 - Adding the head and body sections

Inside the <html></html> tags, add the opening and closing <head></head> tags and the opening and closing <body></body> tags:

<!DOCTYPE html> <html> <head> </head> <body> </body> </html>

4 - Adding a title to the webpage

Inside the <head></head> tags, add the opening and closing <title></title> tags and type a title for your webpage inside them, like this:

<head> <title>My First Webpage</title> </head>

5 - Adding a heading to the webpage

Inside the <body></body> tags, add the opening and closing <h1></h1> tags and type a heading for your webpage inside them, like this:

<body> <h1>Welcome to My First Webpage!</h1> </body>

Join our club 😃

To view the remaining 3 steps and access hundreds of other coding projects please login or create an account.

Copyright Notice
This lesson is copyright of 123code. Unauthorised use, copying or distribution is not allowed.
🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more