What you need to create a web page
A web page is a text file written in a language called HTML, stored on a computer connected to the internet, and viewed through a browser like Chrome or Firefox. You do not need special software or a company account to start. You need three things: a text editor (Notepad on Windows or TextEdit on Mac work fine), basic HTML code, and a way to put that file where people can reach it.
The file itself is just plain text. When you save it with a .html extension instead of .txt, your browser knows to read it as a web page. You can create and test a page on your own computer before anyone else sees it. Once you are ready to share it, you upload the file to a web host — a service that keeps computers running 24/7 so your page stays online.
Key Takeaways
- HTML is the language that tells browsers what to display; you write it in any text editor and save the file with a .html extension.
- A basic page needs opening and closing tags like <html>, <head>, <body>, and <title> to structure the content properly.
- You can test your page locally on your own computer by opening the .html file in a browser before uploading it anywhere.
- To make your page visible to others online, you need web hosting and a domain name, which you purchase from a hosting provider.
- CSS controls how your page looks (colors, fonts, layout), while HTML controls what appears on the page.
The basic structure every page needs
Every HTML page starts with the same skeleton. Open Notepad (Windows) or TextEdit (Mac), and type this exactly:
<!DOCTYPE html> <html> <head> <title>My First Page</title> </head> <body> <h1>Hello World</h1> <p>This is my first web page.</p> </body> </html>
The <!DOCTYPE html> line tells the browser this is an HTML5 page. The <head> section holds information about the page (like the title that appears in the browser tab), and the <body> section holds everything people see. The <h1> tag creates a large heading, and <p> creates a paragraph. Every opening tag like <p> needs a closing tag like </p>.
Save this file as index.html in a folder on your computer. Do not save it as plain text — make sure the file extension is actually .html. On Mac, TextEdit will ask you to confirm; choose "Use .html".
Testing your page before sharing it
Open your browser (Chrome, Firefox, Safari, or Edge). Press Ctrl+O (Windows) or Cmd+O (Mac) to open a file. Navigate to your index.html file and click Open. Your page will appear in the browser exactly as it will look online. This is how you test changes without uploading anything.
If you make changes to the HTML file, save it, then refresh the browser page (Ctrl+R or Cmd+R) to see the updates. This cycle — edit, save, refresh — is how you build and refine your page. You can do this entirely offline, on your own computer, with no internet connection needed.
Adding content and structure to your page
HTML uses different tags for different types of content. <h1> through <h6> create headings (h1 is largest, h6 is smallest). <p> creates paragraphs. <ul> and <ol> create bullet lists and numbered lists. <li> marks each item in a list. <a href="url">link text</a> creates a clickable link.
Here is an example with more content:
<body> <h1>My Hobbies</h1> <p>I enjoy many things in my free time.</p> <ul> <li>Reading</li> <li>Cooking</li> <li>Hiking</li> </ul> <p>Visit <a href="https://www.example.com">my favorite website</a> for more ideas.</p> </body>
Save and refresh your browser to see the changes. The list will display as bullet points, and the link will be clickable and underlined.
Making your page look the way you want with CSS
HTML controls what appears on the page. CSS (Cascading Style Sheets) controls how it looks — colors, fonts, spacing, and layout. You can write CSS inside your HTML file by adding a <style> section in the head.
Here is an example that changes the background color and text color:
<head> <title>My First Page</title> <style> body { background-color: lightblue; color: darkblue; font-family: Arial, sans-serif; } h1 { color: navy; text-align: center; } </style> </head>
The CSS inside the curly braces applies to the tag name before it. body affects the entire page background and text. h1 affects only your main heading. Save and refresh to see the colors and fonts change immediately.
Uploading your page so others can see it
Once your page works locally, you need to put it on the internet. This requires two things: a domain name (like yourname.com) and web hosting (a service that stores your files on a server). Many hosting providers sell both together.
Popular hosting services for beginners include Bluehost, GoDaddy, Namecheap, and HostGator. You create an account, purchase a domain name and hosting plan, then upload your HTML file using a tool called FTP (File Transfer Protocol) or a file manager built into the hosting control panel. The hosting provider gives you instructions for this step.
After you upload your index.html file, anyone can visit your domain name in their browser and see your page. Updates take a few minutes to appear online because browsers and internet servers cache (store) pages temporarily.
Common mistakes and how to avoid them
The most common mistake is forgetting closing tags. Every <p> needs a </p>, every <ul> needs a </ul>. If you forget, the browser will try to guess, and your page may look wrong. Check your code carefully, or use a free HTML validator like the one at validator.w3.org to find errors.
Another mistake is saving the file as .txt instead of .html. On Windows, Notepad defaults to .txt. When you save, type the full name including the extension: index.html, not just index. On Mac, TextEdit will ask you to confirm the format — choose "Use .html".
A third mistake is uploading files to the wrong folder on your hosting account. Most hosting providers expect your main page to be named index.html and placed in the root folder (the top level). If you put it in a subfolder, visitors will see a blank page or an error.
Frequently Asked Questions
Do I need to know how to code to create a web page?
HTML is not programming — it is markup, which means you are labeling content rather than writing logic. You can learn the basics in a few hours by reading examples and practicing. Many people build their first page without any prior experience.
Can I use a website builder instead of writing HTML?
Yes. Services like Wix, Squarespace, and WordPress offer drag-and-drop builders where you do not type code at all. They are easier for beginners but give you less control over the final result. Learning HTML teaches you how the web actually works, which is useful even if you use a builder later.
What if I want to add images to my page?
Use the <img> tag: <img src="photo.jpg" alt="description">. Save the image file in the same folder as your HTML file, and replace "photo.jpg" with the actual filename. The alt text describes the image for people using screen readers.
How much does it cost to put a page online?
Domain names usually cost $10 to $15 per year. Web hosting ranges from $3 to $15 per month for basic plans. Some hosting providers offer the first year of a domain free with a hosting purchase. Prices vary by provider and plan.
Can I edit my page after I upload it?
Yes. Download the file from your hosting account, make changes in your text editor, save it, and upload it again. The new version replaces the old one. This is how you maintain and update your page over time.