
Every website on the internet, from the simplest personal page to the largest online store, is built on HTML. HTML, which stands for HyperText Markup Language, tells browsers how to structure and display content. Learning how to make a basic HTML web page is the perfect first step into web development, and the good news is that you need nothing more than a text editor and a web browser. In this tutorial, you will build a complete basic web page from scratch, learn what each part of the code does, add simple styling, and discover how to put your page online.
When to Hire AAMAX.CO for Professional Results
Building a basic HTML page is a rewarding skill, but a business website needs responsive design, strong performance, accessibility, and SEO. For that level of quality, many businesses hire AAMAX.CO. They are a full service digital marketing company offering web development, digital marketing, and SEO services worldwide. Their experienced team provides professional website development built on clean, semantic HTML, so your site is fast, accessible, and ready to rank from day one.
What You Need to Get Started
- A text editor: Visual Studio Code is free and popular, but Notepad on Windows or TextEdit in plain text mode on Mac also work.
- A web browser: Chrome, Firefox, Edge, or Safari.
- A folder: Create a folder on your computer, such as "my-first-website," to store your files.
Step 1: Create Your HTML File
Open your text editor and create a new file. Save it inside your folder as index.html. The .html extension tells your computer and browser that this is a web page. The name "index" is a convention for the main page of a website.
Step 2: Add the Basic Document Structure
Type the following code into your file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My First Web Page</title>
</head>
<body>
</body>
</html>Here is what each part does:
<!DOCTYPE html>tells the browser this is a modern HTML document.<html lang="en">wraps all content and declares the language as English.<head>contains information about the page that is not displayed directly.<meta charset="UTF-8">ensures text characters display correctly.- The viewport meta tag makes the page display properly on mobile devices.
<title>sets the text shown in the browser tab and in search results.<body>contains everything visitors see on the page.
Step 3: Add Headings and Paragraphs
Inside the body, add a main heading and some text:
<h1>Welcome to My Website</h1>
<p>This is my very first web page. I am learning HTML!</p>
<h2>About Me</h2>
<p>I enjoy photography, hiking, and learning new skills.</p>HTML offers six heading levels, from h1 to h6. Use one h1 for the main title and lower levels for sections and subsections. This hierarchy helps both readers and search engines understand your content.
Step 4: Add a Link
Links connect your page to other pages. Use the anchor element:
<p>Learn more at <a href="https://developer.mozilla.org">MDN Web Docs</a>.</p>The href attribute holds the destination, and the text between the tags is what visitors click.
Step 5: Add an Image
Place an image file, such as photo.jpg, in your folder, then add:
<img src="photo.jpg" alt="Me hiking on a mountain trail" width="600" height="400">The alt attribute describes the image for screen reader users and appears if the image fails to load. Setting width and height helps prevent the layout from jumping while the image loads.
Step 6: Add a List
Lists organize information neatly:
<h2>My Hobbies</h2>
<ul>
<li>Photography</li>
<li>Hiking</li>
<li>Cooking</li>
</ul>Use ul for bulleted lists and ol for numbered lists.
Step 7: Use Semantic Structure
Semantic elements describe the purpose of content. Wrap your page sections like this:
<header>...site title...</header>
<main>...main content...</main>
<footer>...copyright...</footer>Semantic HTML improves accessibility and helps search engines interpret your page.
Step 8: Add Basic Styling With CSS
HTML handles structure, while CSS controls appearance. Add a style element inside the head:
<style>
body {
font-family: Arial, sans-serif;
max-width: 700px;
margin: 0 auto;
padding: 20px;
line-height: 1.6;
}
h1 { color: darkred; }
img { max-width: 100%; height: auto; }
</style>As your styles grow, move them into a separate file, such as styles.css, and link it with <link rel="stylesheet" href="styles.css">.
Step 9: Preview Your Page
Save your file and double-click index.html, or drag it into a browser window. Your web page appears instantly. Each time you make changes, save the file and refresh the browser to see updates.
Step 10: Publish Your Page Online
To share your page with the world, upload it to a hosting service. Free options include GitHub Pages, Netlify, and Vercel, which let you publish static HTML files quickly. Traditional web hosts allow you to upload files through a control panel or FTP.
Conclusion
Making a basic HTML web page is simple and empowering. With a document structure, headings, paragraphs, links, images, lists, semantic elements, and a little CSS, you have created a real web page. From here, you can add more pages, explore CSS layouts, and learn JavaScript to make your site interactive. Every expert developer started exactly where you are now.