What Is HTML? Your First Web Page
What HTML does
HTML (HyperText Markup Language) describes the structure and meaning of web content. A browser reads the markup and presents the content. CSS controls presentation; JavaScript can add behavior.
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>My garden</title> </head> <body> <h1>My garden</h1> <p>I grow mint.</p> </body></html>The page shows a main heading and a paragraph. The surrounding document markup is a template; the next lesson explains it.
Change the content
The h1 element marks the main heading; p marks a paragraph. Replace the text between the tags while keeping the tags intact.
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>My hobby</title> </head> <body> <h1>My hobby</h1> <p>I enjoy drawing.</p> </body></html>The same structure now describes a hobby. Save a copy as index.html using a plain-text editor and open it in a browser.
Common mistake: saving as text
A file named index.html.txt may open as plain text. Check the complete filename and save it as index.html. Try changing the heading and paragraph to describe your own interest.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
What Is HTML? Your First Web Page — Knowledge Check
Apply the concepts and examples from this lesson.
Which file name is suitable for saving your first web page?
Which part of a page would you edit to change its main visible heading?
Which language primarily controls a page's visual presentation?
What does the browser display for <p>I enjoy music.</p>?
You want to change a sample page from gardening to painting. What is the simplest first edit?