Learn how to create a mobile friendly website with responsive design & mobile optimization. Improve user experience and boost your SEO ranking!
:strip_exif():quality(75)/medias/24711/f5800f24a534c49db911fabe68b2ade8.jpg)
So, you want to build your own website? Awesome! It's easier than you think. This guide will show you how to make a simple website using HTML. We'll go over the basics, like how to structure your page, add images, and even make it look good. Whether you're brand new to this or just need a refresher, I hope this article helps you get started!
What's HTML, and Why Should I Care?
HTML? It stands for HyperText Markup Language. Basically, it's the foundation of every website you see. It's what tells the browser what to show, from headings to paragraphs and images. Think of it like this...
HTML is the skeleton of your website. It gives the website structure. Then, CSS adds the style, making it look pretty. And JavaScript? That makes it interactive. Without HTML, all you'd see is just plain text. Bleh.
HTML: Key Things to Know
- Tags: These are keywords inside angle brackets. Like
<p>or<h1>. Most come in pairs: a start tag and an end tag. Example:<p>This is my text.</p> - Elements: An element is a tag, plus the content inside. For example:
<p>This is a paragraph!</p> - Attributes: These give you extra info about an element. They go inside the start tag. For example,
<img src="myimage.jpg" alt="Picture of something">. - Doctype: This tells the browser what version of HTML you're using. For HTML5, it's just
<!DOCTYPE html>. Simple!
Getting Ready to Code
Before you dive into coding, you'll need a couple of things. Don't worry; they're free!
- A Text Editor: This is where you'll write your HTML. I suggest Visual Studio Code (VS Code). It's got helpful features like highlighting and error checking.
- A Web Browser: Chrome, Firefox, Safari, Edge... Pick your favorite! You'll use it to see your website come to life.
That's all you need! No fancy software. Just a text editor and a browser.
Your First HTML File
Ready to write some code? Let's create your first HTML file. Here's how:
- Open your text editor.
- Create a new file.
- Save it as
index.html. The.htmlpart is important! - Copy and paste this code into the file:
<!DOCTYPE html> <html> <head> <title>My First Website</title> </head> <body> <h1>Hello, World!</h1> <p>This is my first website created with HTML.</p> </body> </html>So, what does all that mean?
<!DOCTYPE html>: Tells the browser it's HTML5.<html>: The main part of your page.<head>: Info about your page, like the title.<title>: What shows up in the browser tab.<body>: This is what you see on the page.<h1>: A big heading.<p>: A paragraph of text.
Save the file. Now, open it in your browser. You should see "Hello, World!" and "This is my first website created with HTML." Congrats!
Adding More Stuff
Okay, let's add more content!
Headings
HTML has six levels of headings: <h1> to <h6>. <h1> is the biggest, <h6> is the smallest.
Like this:
<h1>My Awesome Website</h1> <h2>About Me</h2> <h3>My Interests</h3> <h4>My Favorite Things</h4> <h5>My Hobbies</h5> <h6>My Pets</h6>Paragraphs
Paragraphs? Just for text. Use the <p> tag.
Simple example:
<p>This is a paragraph of text. I can add more text here.</p>Lists
HTML has two kinds of lists:
- Ordered Lists (
<ol>): These are numbered. - Unordered Lists (
<ul>): These use bullet points.
For example:
<ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ol> <ul> <li>Item A</li> <li>Item B</li> <li>Item C</li> </ul>Links
Links connect different pages. Use the <a> tag. The href attribute is where you put the link.
Like this:
<a href="https://www.google.com">Visit Google</a>You can also link to other pages on your site. If you have a page called about.html, you can link to it like this:
<a href="about.html">About Us</a>Images
Add pictures using the <img> tag. The src attribute is the image's address. The alt attribute? That is in case the image breaks.
Here's how:
<img src="image.jpg" alt="Picture of a thing">Make sure image.jpg is in the same folder as your HTML file. Or, use the full path to the image.
Putting It All Together
Here's an example of a complete HTML page:
<!DOCTYPE html> <html> <head> <title>My Simple Website</title> </head> <body> <h1>Welcome to My Website!</h1> <p>This is a simple website created with HTML. I am learning about <strong>web development</strong>!</p> <h2>About Me</h2> <p>My name is [Your Name], and I'm learning how to <strong>code</strong> websites. This is a very fun and engaging process.</p> <h3>My Favorite Things</h3> <ul> <li>Pizza</li> <li>Coding</li> <li>Cats</li> </ul> <h2>Links</h2> <p><a href="https://www.google.com">Visit Google</a></p> <p><a href="about.html">About Us</a></p> <h2>Image</h2> <p><img src="image.jpg" alt="A placeholder image"></p> </body> </html>Don't forget to change image.jpg to your actual image. And create an about.html file if you want that link to work!
Making It Look Good with CSS
HTML is the structure. CSS is the style. CSS lets you change colors, fonts, layouts, everything!
Three ways to add CSS:
- Inline CSS: Right inside the HTML tag.
- Internal CSS: Inside the
<head>section. - External CSS: In a separate
.cssfile.
External CSS is usually best. It keeps things organized.
Example: Internal CSS
<!DOCTYPE html> <html> <head> <title>Styled Website</title> <style> body { font-family: sans-serif; background-color: #f0f0f0; } h1 { color: blue; text-align: center; } p { font-size: 16px; line-height: 1.5; } </style> </head> <body> <h1>Welcome to My Styled Website!</h1> <p>This website is styled using CSS. We are changing the font and background color!</p> </body> </html>See how we changed the font, background, and heading color? Experiment!
What's Next?
You did it! You learned how to make a simple website with HTML. You know the basics, created a file, added content, and even messed with CSS. Coding takes practice. So, don't be afraid to mess up!
What should you do now?
- Learn More CSS: Dive deeper! Learn about layouts, animations, and making your site look good on phones.
- Learn JavaScript: Make your site interactive! Add buttons that do things, and games!
- Practice, Practice, Practice: Build more sites! Try different things!
- Check Out Frameworks: Look into React, Angular, or Vue.js. These can help you build bigger, more complex sites.
Web development can be fun. Keep learning, keep building, and be amazed by what you create!

:strip_exif():quality(75)/medias/11196/017c12d57ed46a99ad6b305652217c65.jpeg)
:strip_exif():quality(75)/medias/24623/6ac436b8037cb7ff8e4300ad69d4bf8e.jpg)
:strip_exif():quality(75)/medias/24553/8d89d2a7e5b50012a8487dc20c7f40fe.jpg)
:strip_exif():quality(75)/medias/24538/92ca3cdfebfb93107463d957b42f38c8.png)
:strip_exif():quality(75)/medias/15873/a43683d33b40f413228d54e3c6ed4a2f.jpg)
:strip_exif():quality(75)/medias/24522/99c3a98c2a927bc6cee27c74c35fa5b9.jpg)
:strip_exif():quality(75)/medias/12801/637619f5ccfadde17eea41368c89939d.jpg)
:strip_exif():quality(75)/medias/24446/c4ca4238a0b923820dcc509a6f75849b.jpg)
:strip_exif():quality(75)/medias/24379/a43683d33b40f413228d54e3c6ed4a2f.jpg)
:strip_exif():quality(75)/medias/24239/a43683d33b40f413228d54e3c6ed4a2f.jpg)
:strip_exif():quality(75)/medias/24232/fd8c9af125032a3640053d430355156a.png)
:strip_exif():quality(75)/medias/24212/45cb53029db90efd903e80bb798f1b21.jpg)
:strip_exif():quality(75)/medias/29042/db29275d96a19f0e6390c05185578d15.jpeg)
:strip_exif():quality(75)/medias/13074/7b43934a9318576a8162f41ff302887f.jpg)
:strip_exif():quality(75)/medias/25724/2ca6f702dd0e3cfb247d779bf18d1b91.jpg)
:strip_exif():quality(75)/medias/6310/ab86f89ac955aec5f16caca09699a105.jpg)
:strip_exif():quality(75)/medias/30222/d28140e177835e5c5d15d4b2dde2a509.png)
:strip_exif():quality(75)/medias/18828/f47223907a02835793fa5845999f9a85.jpg)
:strip_exif():quality(75)/medias/30718/25151f693f4556eda05b2a786d123ec7.png)
:strip_exif():quality(75)/medias/30717/fec05e21b472df60bc5192716eda76f0.png)
:strip_exif():quality(75)/medias/30716/60c2e3b3b2e301045fbbdcc554b355c0.png)
![How to [Skill] Without [Requirement]](https://img.nodakopi.com/4TAxy6PmfepLbTuah95rxEuQ48Q=/450x300/smart/filters:format(webp):strip_exif():quality(75)/medias/30715/db51577c0d43b35425b6cd887e01faf1.png)
:strip_exif():quality(75)/medias/30714/2be33453998cd962dabf4b2ba99dc95d.png)
:strip_exif():quality(75)/medias/30713/1d03130b0fb2c6664c214a28d5c953ab.png)
:strip_exif():quality(75)/medias/30712/151df5e099e22a6ddc186af3070e6efe.png)
:strip_exif():quality(75)/medias/30711/e158fd6e905ffcdb86512a2081e1039d.png)
:strip_exif():quality(75)/medias/30710/0870fc9cf78fa4868fa2f831a51dea49.png)