Make your first web page
Give a document its HTML structure and add a heading and paragraph.
- 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.
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>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.
A page of your own
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
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…