HTML Basics Tutorialspoint: A Comprehensive Beginner’s Guide

Welcome to our comprehensive HTML basics tutorial. HTML, or HyperText Markup Language, is the standard markup language used to create and structure content on the World Wide Web. It's the foundation of any web page, and understanding its basics is a crucial first step in web development.

Basics of HTML
Basics of HTML

In this tutorial, we'll begin by understanding the basic structure of an HTML document, then delve into tags, attributes, and how to create your first web page. Let's dive in and start building web content together!

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

Understanding HTML Document Structure

An HTML document must start with a well-formed document type declaration, followed by the root element .

a red and black text description for a web page with an arrow pointing to it
a red and black text description for a web page with an arrow pointing to it

The element is the container for all other elements in an HTML document. It consists of the element, which contains meta-information about the document, and the element, which contains the visible page content.

Document Type Declaration (Doctype)

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 '

The doctype declaration helps browsers understand which version of HTML the document is written in. It should be the first thing in your HTML document.

For HTML5, the doctype is very simple: "". This doctype declaration is a must, as it helps to display webpages correctly in different browsers.

The Head and Body of an HTML Document

Easiest Way to learn HTML
Easiest Way to learn HTML

The element contains meta-information about the document, including its title, scripts, and style sheets. The element is crucial as it defines the title of the web page and is displayed in the browser's title bar or in the page's tab.</p></div><div class="mb-4"><p>The <body> element contains the visible page content - text, images, hyperlinks, tables, lists, etc. It's the largest and most important section of the HTML document.</p></div><div class="mb-4"><h2>HTML Tags and Elements</h2></div><figure class="image-section"><img src="https://i.pinimg.com/originals/24/ea/1e/24ea1ee003c81a67cdfbc597a9ad788a.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="17 Simple HTML Code Examples to Learn in 10 Minutes"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">17 Simple HTML Code Examples to Learn in 10 Minutes</figcaption></figure><div class="mb-4"><p>HTML tags are not defined by a standard but by browser manufacturers. They tell the browser how to display the content. Tags are not case-sensitive, but it's a good practice to write them in lowercase.</p></div><div class="mb-4"><p>Elements are HTML tags that have both opening and closing tags. The content of the element is placed between these tags.</p></div><figure class="image-section"><img src="https://i.pinimg.com/originals/bf/99/bc/bf99bcfe01dc0d9115cf3795d81ab7b7.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML Full Notes for Beginners 💻"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML Full Notes for Beginners 💻</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/68/73/d1/6873d15b9414b094e5501d4e3840bfa1.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="a computer screen with the text html and an image of a web page on it"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">a computer screen with the text html and an image of a web page on it</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/cd/c4/d0/cdc4d08e5f3b71db7822a43b80c54bdd.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML Basic Tables"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML Basic Tables</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/b3/94/d1/b394d125cc41cd7ae8e742b888e7a07c.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML,CSS JAVASCRIPT cheatsheet"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML,CSS JAVASCRIPT cheatsheet</figcaption></figure><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><figure class="image-section"><img src="https://i.pinimg.com/originals/4e/d9/a8/4ed9a84da54d927eba42b7c3d9dfd378.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="a black and orange poster with text that says,'html chat sheet'on it"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">a black and orange poster with text that says,'html chat sheet'on it</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/aa/21/7d/aa217d68c79d5aa873def6588e22b072.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML Tutorial For Beginners"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML Tutorial For Beginners</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/ff/0c/7f/ff0c7ff85fd152651b677b28bb4a2603.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="an info sheet with the text basic html structure in blue and white, on top of it"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">an info sheet with the text basic html structure in blue and white, on top of it</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/53/34/0c/53340c208aa81aaa206a11fe4ddc6bb3.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="HTML Attributes"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">HTML Attributes</figcaption></figure><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><figure class="image-section"><img src="https://i.pinimg.com/originals/2d/cc/dd/2dccdda2cd57acacee6f1f5f545a735b.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/47/5b/aa/475baa0d606839ef283aff04c38b9503.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="a man sitting in front of a computer with the words how to learn the basics of htmlcs?"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">a man sitting in front of a computer with the words how to learn the basics of htmlcs?</figcaption></figure><figure class="image-section"><img src="https://i.pinimg.com/originals/c6/0f/2c/c60f2ce7b681ccd68ca8edbba4ef5dca.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="a handwritten text description for a webpage using the basic structure of html and css"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">a handwritten text description for a webpage using the basic structure of html and css</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/ec/bb/21/ecbb21ea6291a53110febab02f2b143c.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="CSS Notes for Beginners (Easy + Quick Guide) 🎨"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">CSS Notes for Beginners (Easy + Quick Guide) 🎨</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/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/68/cd/a9/68cda9f30a18785f205afebb2d037e6a.png" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="html notes"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">html notes</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/fa/f0/a4/faf0a4fe6ba95e094f02136f7bded7a9.jpg" class="section-image" style="width:100%; height:auto; border-radius:8px; margin: 20px 0;" alt="Basics of HTML"><figcaption style="font-size:0.85rem; color:#666; margin-top:8px;">Basics of HTML</figcaption></figure><div class="mb-4"><h3>HTML Tag Syntax</h3></div><div class="mb-4"><p>Tags are enclosed in angle brackets (like this: <>. An opening tag is made up of the tag name followed by a greater-than symbol (>), and a closing tag is made up of a less-than symbol (<), a slash (/), the tag name, and a closing angle bracket (</>).</p></div><div class="mb-4"><p>Here's an example of an HTML element, a paragraph (<p>:</p></div><div class="mb-4"><p>): ```html <p>This is a paragraph of text.</p></p></div><div class="mb-4"><p>```</p></p></div><div class="mb-4"><h3>HTML Tags with Attributes</h3></div><div class="mb-4"><p>Attributes provide additional information about HTML elements. They appear inside the opening tag of an HTML element, in the form attribute="value".</p></div><div class="mb-4"><p>Here's an example of an <a> (anchor) tag with an attribute: ```html <a href="https://www.tutorialspoint.com">This is a link</a> ``` The `href` attribute defines the URL of the page the link goes to.</p></div><div class="mb-4"><h2>Creating Your First HTML Web Page</h2></div><div class="mb-4"><p>Now that you understand the basics, let's create a simple HTML web page. Open a new text file in a text editor, write the following HTML code, and save it as 'index.html'.</p></div><div class="mb-4"><p>Here's a simple example of an HTML document: ```html <!DOCTYPE html> <html> <head> <title>My Web Page

Welcome to My Web Page!

This is my first web page created using HTML!

```

Running Your HTML Document

To view your HTML document, open it in a web browser, such as Google Chrome or Mozilla Firefox. Your web page should be displayed in the browser, with the h1 heading at the top saying 'Welcome to My Web Page!'.

And there you have it: your first HTML web page! As you continue your learning journey, you'll discover and master more complex aspects of HTML and web development.

Continuing Your Learning Journey

The best way to learn HTML is by doing. Start building more web pages, experiment with different tags and attributes, and watch your skills and confidence grow.

Remember, the web is a vast and fascinating place, and there's always more to explore. So, keep learning, and happy coding!

Related Articles

How To Solve Rubik's Cube Step By Step In Hindi How To Solve Rubik's Cube Step By Step Pdf 5x5 Rubik's Cube Instructions Pdf Html Tutorial For Dummies How To Solve Rubik's Cube 3x3 Step By Step Trick Image Tag In Html Tutorialspoint How To Learn Rubik's Cube Algorithms Hyperlink In Html Tutorialspoint How Do You Solve A 3 By 3 Rubik's Cube Step By Step What Is The Fastest Way To Solve A 3 By 3 Rubik's Cube