HTML Fundamentals

HTML Fundamentals

Introduction

HTML, or HyperText Markup Language, is the standard markup language used for creating web pages. It provides the structure for web content by utilizing a series of elements that define and display text, images, links, and other multimedia on the Internet.

Structure of HTML

HTML documents are structured using a set of elements. An HTML document typically consists of the following primary sections:

  • Doctype declaration: Indicates the version of HTML being used.
  • HTML tag: The root element that contains all other HTML elements.
  • Head section: Contains metadata, including the title and links to stylesheets or scripts.
  • Body section: Contains the content that is displayed on the web page.

Basic HTML Elements

Some of the most commonly used HTML elements include:

  • <h1> to <h6>: Heading tags, where <h1> is the highest level and <h6> is the lowest.
  • <p>: Paragraph tag for text content.
  • <a>: Anchor tag for creating hyperlinks.
  • <img>: Image tag for embedding images in a document.
  • <div>: Division tag, used to group and style HTML elements.

Example of an HTML Document

Below is a simple example of a basic HTML document.





    
    
    My First Web Page


    

Welcome to My First Web Page

This is a paragraph of text on my web page.

Visit Example.com