Build Your First Web Page: HTML and CSS in Ten Minutes
A web page is a text file. You don't need to install anything to make one. A text editor and a browser are enough, and the first working page is the hardest step.
Create the file
Make a new text file called index.html. Paste in this starting point and save it:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My first page</title>
</head>
<body>
<h1>Hello</h1>
<p>This is my page.</p>
</body>
</html>Double-click the file and it opens in your browser.Understand the parts
The head holds information about the page, like its title. The body holds what people see. Tags such as h1 (a main heading) and p (a paragraph) describe what each piece of content is.
Add some style
Add a style block inside the head:
<style>
body { font-family: system-ui, sans-serif; max-width: 40rem; margin: 2rem auto; padding: 0 1rem; line-height: 1.6; }
h1 { color: #3b4cca; }
</style>Refresh the browser to see the change. The text in curly brackets sets properties for the elements you named.Use meaningful tags
Use header, nav, main and footer instead of generic boxes. They help screen readers and search engines understand your page, and they cost nothing.
Make it work on phones
The viewport line in the head is what makes the page fit a phone screen. Keep it. Use widths in percentages or max-width instead of fixed pixel widths.
Where code tools help
Describing a page in words and getting a first draft is a fast way to start, and the live preview shows the result at once. Read what it produces and change something yourself. That is how you learn what each line does.
Try it: Try Words to HTML in Studio and ask for a page in plain English. Open the tools. Everything the tools produce is a first draft. Check it before you use it.
