This is a website for learning HTML

Paragraph Tag

This is an example of a paragraph tag. It is very useful for separating different parts of the content.

This is a separate paragraph.

Heading Tags

Headings are very useful tags used for titles and subheadings. They range from h1 to h6, where a higher number represents a subsection of a lower number, as shown below:

It’s best to use only one h1 per page as the main topic of the page.

Don’t use heading tags just for their size. Use an h2 only if there is an h1 before it.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

HTML Boilerplate

This is the most important part of an HTML file that makes it valid and functional.

<!DOCTYPE html>: This declaration tells the browser that we are using HTML5.

<html>: The root element of the HTML document, which contains the head and body sections.

<head>: This section contains meta-information and other tags that are not displayed directly on the page.

<body>: This section contains the visible content of the page such as paragraphs and headings.

Title Tag

The <title> tag belongs in the <head> section and sets the name of the browser tab.

List Elements

There are two types of list elements:

To add an item to a list, use the <li> tag inside the list. You can also nest other elements inside <li> elements.

Anchor Tag

The <a> tag is used for creating hyperlinks, as shown below. To specify the link destination, use the href attribute.

About me

Attributes

Attributes provide additional information about HTML elements. They are added inside the opening tag.

Image Tag

The <img> tag is a self-closing tag used to display images. You must use the src attribute to specify the image path.

The alt attribute is useful when the image cannot be loaded. It provides alternative text describing the image.

A random logo

Comments

Comments are not rendered in the browser and are used as notes in your code.

Section 2