Your first HTML page
Write a real web page from scratch and open it in your browser.
HTML uses tags to tell the browser what each piece of content is. Most tags come in pairs: an opening tag <p> and a closing tag </p>.
Set up
- Install a free code editor. Visual Studio Code is the most common one at work.
- Create a folder called
my-site. - Inside it, create a file called
index.html.
Write the page
Copy this into index.html:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My first page</title>
</head>
<body>
<h1>Hola, I'm Ana</h1>
<p>I'm learning web development with Maestro by Nodo Latino.</p>
<h2>Things I love</h2>
<ul>
<li>Music</li>
<li>My family's cooking</li>
<li>Solving problems</li>
</ul>
<a href="https://nodolatino.dev">Visit Nodo Latino</a>
</body>
</html>
Save the file, then double-click it. It opens in your browser. You just built a web page.
What each tag means
<h1>to<h6>: headings, from most to least important<p>: a paragraph<ul>and<li>: an unordered (bulleted) list and its items<a href="...">: a link.hrefis an attribute that says where it goes
Your turn
Change the name to yours, add three things you love, and add an image with <img src="photo.jpg" alt="A description of the photo">. The alt text is read aloud by screen readers, so always describe the image.