Um momento
0x00Lesson 1 of 6

Make your first web page

Give a document its HTML structure and add a heading and paragraph.

12 min 5-question quiz 1 code exercise
By the end of this lesson you can
  • Recognize an HTML element
  • Create a document with head and body
  • Add a heading and paragraph

HTML (HyperText Markup Language) describes the content and structure of a web page. A browser reads the markup and turns it into the page you see. HTML is a markup language: tags describe content; CSS controls its appearance and JavaScript can add behavior.

index.html
1<!doctype html>
2<html lang="en">
3  <head>
4    <meta charset="utf-8">
5    <title>My page</title>
6  </head>
7  <body>
8    <h1>Hello, web!</h1>
9    <p>I am learning HTML.</p>
10  </body>
11</html>
Output
Hello, web!
I am learning HTML.

An element usually has an opening tag, content, and a closing tag, like <p>Text</p>. The <head> holds information about the document. The <body> holds content displayed on the page. The doctype tells browsers to use modern HTML rules.

Key takeaways

  • HTML describes page structure and content.

  • The head contains document information; the body contains page content.

  • Most elements wrap content with opening and closing tags.

Lesson quiz

5 questions · pass with 4 correct · up to 50 XP

Passing this quiz completes the lesson and keeps your streak going. Questions you miss come back in review sessions later.

Practice: write HTML

Write the markup, preview it in a sandboxed browser frame, and check the visible text against the requirements.

Exercise 1

A page of your own

+25 XP

Create a page with a level-one heading that says My first page and a paragraph that says Built one tag at a time. The checks look at the text displayed by your page.

  • Page text
index.html
Loading editor…
Page preview

Your markup is previewed in a sandboxed frame. Run tests to check the visible page text.

Questions about this lesson

Stuck? Ask. Figured something out? Share it. Explaining is one of the best ways to learn.

Loading posts…

Gostou da aula? 😆👍
Apoie nosso trabalho com uma doação: