Complete HTML Tutorial for Beginners www tutorialspoint index htm guide

Welcome to our comprehensive guide on getting started with HTML using a simple 'index.html' file on TutorialsPoint. By the end of this tutorial, you'll have a solid foundation to start building and understanding web pages. Let's dive in!

HTML Cheat Sheet 📄✨ Quick Guide for Beginners
HTML Cheat Sheet 📄✨ Quick Guide for Beginners

HTML, or HyperText Markup Language, is the standard markup language for creating and describing the structure of web pages. It's the first and most basic building block in web development. Throughout this tutorial, we'll guide you step-by-step through creating an HTML file and understanding its basic elements.

Best Free Websites to Learn Coding for Beginners (2026)
Best Free Websites to Learn Coding for Beginners (2026)

Setting Up Your First HTML File

To begin, you'll need to create a new text file on your computer and save it with a .html extension. For this tutorial, let's name it 'index.html'.

a screen shot of a web page with the words'html input types '
a screen shot of a web page with the words'html input types '

Once created, open your 'index.html' file with a text editor like Notepad on Windows or TextEdit on Mac. Make sure you're creating this file on your computer's hard drive, not in an online cloud service, as the latter may auto-save in a format that's not entirely compatible with our needs.

insufflating Basic HTML Structure

the basic instructions for creating a web page with html and jtmll on it
the basic instructions for creating a web page with html and jtmll on it

First, let's insert the basic structure of an HTML file. This includes the declaration, which defines the document to be HTML5, and the opening and closing , , and tags. Your file should look like this:

``` ```

You'll notice that the element is currently empty. This is where we'll place meta-information, like the page title. Let's add that now.

Adding the Tag</h3></div><figure class="image-section"><img src="https://i.pinimg.com/originals/b8/1a/83/b81a83acd2eaa1a07fba2c6de8fb9b05.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML Cheat Sheet for Beginners (Quick Guide)"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML Cheat Sheet for Beginners (Quick Guide)</figcaption></figure><div class="mb-4"><p>The <title> tag is crucial as it specified the title of the web page. The text within the <title> tag is displayed in the browser's title bar or in the page's tab in the browser. You can add a title to your 'index.html' file like so:</p></div><div class="mb-4"><p>```html <!DOCTYPE html> <html> <head> <title>My First HTML Page ```

When you open this file in a web browser, you'll see the title "My First HTML Page" in the browser tab. This demonstrates how the tag works.</p></p></div><div class="mb-4"><h2>Creating Structural Elements with HTML</h2></div><figure class="image-section"><img src="https://i.pinimg.com/originals/99/8e/d3/998ed3f4c11df7d27c5c1cb144965b44.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="the basics of html for web designers and bloggers, including instructions on how to use them"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">the basics of html for web designers and bloggers, including instructions on how to use them</figcaption></figure><div class="mb-4"><p>Now that we have the basic setup, let's start adding content to our HTML file. We'll start with the most fundamental HTML elements, headers and paragraphs.</p></div><div class="mb-4"><p>Headers in HTML are defined with the tags <h1> through <h6>, with <h1> being the largest and <h6> the smallest. We'll use <h1> to demonstrate. Paragraphs are defined with the <p> tag.</p></div><figure class="image-section"><img src="https://i.pinimg.com/originals/ad/07/b2/ad07b21f0a451649653ef7f7db0e237e.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="Web Development programing tricks and tips for beginners free"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">Web Development programing tricks and tips for beginners free</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/3f/43/2f/3f432f54432a979379628de626e0be89.webp" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="the different types of text and numbers are shown in this graphic diagram, which shows how to"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">the different types of text and numbers are shown in this graphic diagram, which shows how to</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/d5/69/45/d569452e37a58bb127ae5164bbd36af6.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="login form html css"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">login form html css</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/bb/f7/4f/bbf74ff3039eb8b387b461cf19918ec5.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="Web Development programing tricks and tips for beginners free"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">Web Development programing tricks and tips for beginners free</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/06/cf/ff/06cffff39707652e8fd60584ea74d53a.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="Complete Beginner HTML Master Notes"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">Complete Beginner HTML Master Notes</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/51/71/50/51715036ffd6f2698417e993d2744022.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="Basic HTML Video"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">Basic HTML Video</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/91/7f/35/917f35280bbd637bb4ec1684a7b29d78.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="the ultimate guide to creating and formating tags"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">the ultimate guide to creating and formating tags</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/e0/4c/77/e04c7753fec403cde7983ead8364b52c.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="html css download button animation"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">html css download button animation</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/9b/2f/17/9b2f17134d198715d3da11a3af27dee6.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="Come realizzare una pagina in Html5: novità e semantica"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">Come realizzare una pagina in Html5: novità e semantica</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/d4/e9/0a/d4e90aa8734c9d52289bff6a8bfcbf23.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="✅ Create Lists in HTML"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">✅ Create Lists in HTML</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/5a/e1/8b/5ae18bfb0cc96b8f208289873fb177f6.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="Master HTML in 10 Minutes 💻 Beginner Cheatsheet"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">Master HTML in 10 Minutes 💻 Beginner Cheatsheet</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/5a/b5/cd/5ab5cda391c125f010eae251481ca9e9.webp" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="How to create a website using html"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">How to create a website using html</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/44/a2/32/44a232002d05f31de198a9a1a0ab79a5.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML Input Types : A Comprehensive Guide"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML Input Types : A Comprehensive Guide</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/89/72/52/897252bcdebe6e7364248451921438be.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="a handwritten diagram with the words html and an image of a computer screen on it"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">a handwritten diagram with the words html and an image of a computer screen on it</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/28/ec/5b/28ec5bf433c7b88546651ab6d9dc06f6.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="two screens showing different types of webpages and the same one with words on them"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">two screens showing different types of webpages and the same one with words on them</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/ab/07/85/ab0785ac7df78a94f438cdc812d596d5.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML INPUT TAGS | web development | computer engineering"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML INPUT TAGS | web development | computer engineering</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/23/63/d7/2363d7ff226af4d0dd9ead05a9e34382.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML Input Types – Complete Guide for Beginners"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML Input Types – Complete Guide for Beginners</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/82/53/4c/82534ca5559b7587fd2aedf94ba33fa6.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="the top 10 best practices for html to help you improve your site's performance and seo"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">the top 10 best practices for html to help you improve your site's performance and seo</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/81/a0/04/81a004f5dc07714fab0221a514a194e8.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="#html #webdevelopment #frontend #programming #coding #javascript #webdesign #learntocode #developers #techsuggester | Tech Suggester"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">#html #webdevelopment #frontend #programming #coding #javascript #webdesign #learntocode #developers #techsuggester | Tech Suggester</figcaption></figure><div class="mb-4"><h3>Adding a Header and a Paragraph</h3></div><div class="mb-4"><p>Let's add a header with <h1> and a paragraph with <p> to our 'index.html' file:</p></div><div class="mb-4"><p>```html <!DOCTYPE html> <html> <head> <title>My First HTML Page

Welcome to my HTML page!

This is a paragraph. HTML is really easy to learn!

```

When you open this file in a web browser, you'll see a large heading that says "Welcome to my HTML page!" and a paragraph that says "This is a paragraph. HTML is really easy to learn!".

Styling Text with HTML

HTML allows us to style text, too, using tags like and . is used to present important text, while is used to stress emphasis. Let's update our paragraph to demonstrate:

```html My First HTML Page

Welcome to my HTML page!

This is a paragraph. HTML is really easy to learn!

```

In the browser, this will display as: "This is a paragraph. **HTML** is really *easy* to learn!". The words "HTML" and "easy" are stylized, showing how we can make text stand out.

Adding Unordered and Ordered Lists

HTML also allows us to create lists. We'll demonstrate both an unordered list, which uses the

    and
  • tags, and an ordered list, which uses the
      and
    1. tags.

Unordered List

Let's add an unordered list to our 'index.html' file, showing some of the elements in the HTML family:

```html My First HTML Page

Welcome to my HTML page!

This is a paragraph. HTML is really easy to learn!

  • HTML
  • CSS
  • JavaScript

```

This will display as a bullet-pointed list, with each list item starting with a bullet point.

Ordered List

Now let's add an ordered list, showing the steps in learning HTML:

```html My First HTML Page

Welcome to my HTML page!

This is a paragraph. HTML is really easy to learn!

  • HTML
  • CSS
  • JavaScript
  1. Learn the basics of HTML
  2. Understand CSS for styling
  3. Combine with JavaScript for interactivity

```

This will display as a numbered list, with each list item starting with a number and a period.

Being able to create ordered and unordered lists is a powerful feature of HTML, as it structures and displays complex sets of information clearly and efficiently.

xb2) Building with Templates and Frameworks

Finally, it's worth noting that while you can write HTML from scratch, there are numerous pre-built templates and frameworks that you can use as a starting point. These often come with pre-set styles and can save you a lot of time and energy. Examples include Bootstrap and Foundation.

Within these, you'll often find pre-built components that can be dragged and dropped into place, further streamlining your development process. The specifics of how to use these are beyond the scope of this tutorial, but they're certainly something to investigate as your skills and ambitions grow.

And there you have it - the basics of HTML! You've now written and customized your first HTML file, inserted headers, paragraphs, styled text, and even created lists. As you grow in your web development journey, each of these steps will form the foundation of more complex and exciting web pages. Happy coding!

Related Articles