Basic Structure of an HTML
Part of the Fundamentals section of Coddy's HTML journey. Lesson 2 of 60.
Every HTML document follows a simple structure.
It starts with <!DOCTYPE html>, which tells the version of HTML we are using.
This is followed by the <html> tag, which contains all the HTML content.
Inside the <html> tag, we add the <body> tag, which holds all the visible content of the webpage.
Here’s a simple example:
<!DOCTYPE html>
<html>
<body>
This is some text.
</body>
</html>In this example, the text inside the <body> tag will be displayed as text on the webpage.
Challenge
EasyReplace REPLACE THIS TEXT inside the <body> tag with:
To Infinity And Beyond!You do not need any tags here, just plain text.
Try it yourself
<!DOCTYPE html>
<html>
<body>
<!-- Replace the line below with the required text -->
REPLACE THIS TEXT
</body>
</html>This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
1HTML Basics
What is HTML?Basic Structure of an HTMLTags and ElementsNesting and Closing TagsComments in HTML2Text and Formatting
HeadingsParagraphsLine BreaksBold and Italic TextBold and Italic AgainRecap - Formatting8Forms and Inputs Part 1
Form BasicsText InputsInput AttributesPassword FieldLabels for InputsRecap - Basic Form11Event Registration Page
Project OverviewHeader Section9Forms and Inputs Part 2
Radio ButtonsCheckboxesDropdownsButtonsButtons in FormsRecap - Forms #1Recap - Forms #2Practice on your own: Web playground