HTML Formatting

This page will teach you how to format a web page with HTML tags.

HTML (HyperText Markup Language) is a markup language used to create and structure web content. It uses a series of tags and attributes to define the structure and content of a web page.

This is an example of a basic HTML code:

<!DOCTYPE html>
<html>
  <head>
    <title>My First HTML Page</title>
  </head>
  <body>
    <h1>This is a Heading</h1>
    <p>This is a paragraph.</p>
    <ul>
      <li>Item 1</li>
      <li>Item 2</li>
      <li>Item 3</li>
    </ul>
  </body>
</html>

When executed it will give you this result below:

This code creates a simple HTML page with a heading and a paragraph, as well as an unordered list. The <!DOCTYPE html> declaration specifies the type of document, in this case, an HTML5 document. The <html> tag surrounds the entire page, while the <head> section contains information about the document, such as the title that will appear in the browser tab. The <body> section contains the main content of the page, including the heading, paragraph, and list.

Many different HTML tags can be used to format text and create headings, lists, links, images, tables, and more. To learn more about HTML, you can check out the official HTML specification, or try a beginner's tutorial online.

Last updated