Welcome to the HTML Basics course! This guide will help you understand the fundamentals of HTML, the standard markup language for creating web pages.

Table of Contents

Introduction

HTML (Hypertext Markup Language) is the backbone of the web. It defines the structure and content of web pages. With HTML, you can create headings, paragraphs, links, images, and much more.

Basic HTML Structure

Every HTML document starts with a <!DOCTYPE html> declaration, followed by the opening <html> tag. The HTML document is then divided into two main sections: the <head> and the <body>.

<!DOCTYPE html>
<html>
<head>
  <title>Document Title</title>
</head>
<body>
  <!-- Content goes here -->
</body>
</html>

Elements

HTML elements are the building blocks of HTML pages. They are defined by tags, such as <h1>, <p>, <a>, and <img>.

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<a href="https://www.example.com">This is a link</a>
<img src="image.jpg" alt="Image description">

Attributes

Attributes provide additional information about HTML elements. For example, the <img> element can have an src attribute to specify the image source and an alt attribute to provide a text alternative for the image.

<img src="image.jpg" alt="Golden Retriever">

Lists

HTML supports two types of lists: ordered lists (<ol>) and unordered lists (<ul>).

<ol>
  <li>First item</li>
  <li>Second item</li>
</ol>

<ul>
  <li>First item</li>
  <li>Second item</li>
</ul>

Links

HTML links are created using the <a> element. The href attribute specifies the URL of the linked resource.

<a href="https://www.example.com">This is a link</a>

Images

Images can be added to HTML pages using the <img> element. The src attribute specifies the image source, and the alt attribute provides a text alternative for the image.

<img src="image.jpg" alt="Golden Retriever">

Further Reading

For more information on HTML, please visit our HTML Tutorial.

Golden Retriever