HTML Basics: A Beginner’s Guide
24 March 2025 | Category: HTML
Learning HTML is the first step in web development. You don’t need advanced tools—just a simple text editor like Notepad (Windows) or TextEdit (Mac). This guide will help you create your first HTML page in just a few steps.
What is HTML?
HTML (HyperText Markup Language) is the foundation of web pages. It structures content using elements like headings, paragraphs, and links.
Setting Up Your Editor
- Windows Users: Open Notepad (search “Notepad” in the Start menu).
- Mac Users: Open TextEdit and switch to plain text mode via Format > Make Plain Text.
Writing Your First HTML Page
Copy and paste the following code into your editor:
Saving and Viewing Your Page
- Click File > Save As.
- Name the file index.html and select UTF-8 encoding.
- Save it in a folder on your computer.
- Double-click index.html to open it in your web browser.
Understanding the Code
- <!DOCTYPE html> – Declares the document type.
- <html> – Wraps the entire content.
- <head> – Contains metadata and the page title.
- <body> – Displays the visible content.
- <h2> – Defines a heading.
- <p> – Defines a paragraph.
Next Steps: Customizing Your Page
Try modifying your page:
- Change the
<h2>
text. - Add a bold phrase using
<b>Bold Text</b>
. - Create a link using
<a href="https://example.com">Click Here</a>
.
Conclusion
This is your first step into HTML! As you explore more, you can try CSS and JavaScript to enhance your pages. Happy coding!