Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Document Structure | Document Structure
Ultimate HTML
course content

Course Content

Ultimate HTML

Ultimate HTML

1. Web Development
2. Tags and Attributes
3. Document Structure
4. Media and Tables
5. Forms

bookChallenge: Document Structure

🏁 Goal

Build the correct webpage by creating a basic HTML document structure. This structure is the backbone of every HTML page and consists of essential elements browsers need to render your content correctly.

Note

Don't be misled by the apparent simplicity of the webpage's design. While it might seem straightforward, it remains paramount to maintain the correct document structure. This ensures that the website retains readability and functionality across all browsers.

📋 Task

Create a basic HTML document structure. If you're already confident in your abilities, feel free to proceed without the step-by-step guide. However, if you'd like a bit more guidance, a step-by-step walkthrough is available to help you along the way.

📝 Step-by-Step Guide

Step 1: Start the HTML Document

Begin by typing the HTML doctype declaration, which tells the browser that the document is written in HTML. The declaration should be the first line of your HTML document:

html

index

css

index

js

index

copy

Step 2: Add the HTML Opening and Closing Tags

After the doctype declaration, add the opening and closing HTML tags. The entire HTML document structure will be contained within these tags. Additionally, include the lang attribute to specify the language of the document:

html

index

css

index

js

index

copy

Step 3: Create the Head Section

Add the opening and closing <head> tags inside the HTML tags. The head section contains meta-information about the HTML document, such as the title and links to external stylesheets:

html

index

css

index

js

index

copy

Step 4: Add the Title

Within the <head> tags, add the opening and closing <title> tags. The text we enter between these tags will be displayed as the title of the webpage in the browser's title bar or tab:

html

index

css

index

js

index

copy

Step 5: Create the Body Section

After the <head> section, add the opening and closing <body> tags. The body section contains the visible content of the webpage:

html

index

css

index

js

index

copy

Step 6: Add Content to the Body

We can add elements within the <body> tags, such as headings, paragraphs, images, links, etc. Here's an example of adding a heading and a paragraph:

html

index

css

index

js

index

copy

Try It Yourself

html

index

css

index

js

index

copy

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 5
We're sorry to hear that something went wrong. What happened?
some-alt