Say hello in HTML

Write your first two elements.

What to build

A heading with your greeting, and one paragraph under it.

Requirements

  • One h1 element with the exact text Hello, world.
  • One p element with any text.

Constraints

Use exactly one h1 and one p. Do not use CSS.

Example

<h1>Hello, world</h1>
<p>This is my first page.</p>

Why it works

A browser reads h1 as the main heading and p as a block of text, and shows each on its own line.

Hints

Hint 1

A heading uses h1 and a paragraph uses p. Each needs a closing tag with a slash.

Solution

Show one correct solution (try it yourself first)
<h1>Hello, world</h1>
<p>This is my first page.</p>

Lesson: What HTML is and how a browser reads it →