What is HTML?

HTML, which stands for HyperText Markup Language, is the standard markup language used to create the structure and content of web pages. It forms the backbone of web development by providing a set of elements and tags that define the different parts of a document, such as headings, paragraphs, images, links, forms, and more.

HTML is not a programming language; it's a markup language that structures the content on a webpage. Web browsers interpret HTML code and render it into a visually appealing and interactive web page that users can navigate and interact with.

Basic Structure of an HTML Document

The basic structure of an HTML document involves several essential elements. Here is a sample as well as the detail to what you might include in a basic structure;

                        
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Your Document Title</title>
</head>
<body>
                            
    <!-- Your content goes here -->
                            
</body>
</html>
                        
                    

Let's break down each part:

  1. <!DOCTYPE html>: This declaration defines the document type and version of HTML. In this case, it's HTML5.
  2. <html lang="en">: The root element of an HTML document. The 'lang' attribute is set to "en" (English), indicating the language of the document.
  3. <head>:This section contains meta-information about the HTML document, such as character set, viewport settings, and the document's title.
    • <meta charset="UTF-8">: Specifies the character encoding for the document (UTF-8 is widely used and supports a broad range of characters).
    • <meta name="viewport" content="width=device-width, initial-scale=1.0">Helps ensure proper rendering on various devices by setting the viewport width to the device width and initial zoom level to 1.
    • <title>Your Document Title</title>: Sets the title of the HTML document, which appears in the browser's title bar or tab.
  4. <body>:The body element contains the actual content of the HTML document, such as text, images, links, and other elements.

HTML Version History

HTML has undergone several revisions, with each version introducing new features and improvements. Here's a brief overview of the major HTML versions:

HTML5 is the current standard for web development and is widely supported by modern browsers. It continues to evolve with ongoing improvements and extensions.

HTML Elements

Headings

Headings are used to define headings for sections of content. There are six levels of headings, from <h1> (the largest and most important) to <h6> (the smallest).

Sample Code:


    <h1> This is the 'h1' heading. </h1>
    <h2> This is the 'h2' heading. </h2>
    <h3> This is the 'h3' heading. </h3>
                  

Output:

This is the 'h1' heading.

This is the 'h2' heading.

This is the 'h3' heading.

Understanding these elements is crucial for structuring content effectively and creating well-designed web pages. As you delve deeper into HTML, you'll discover additional elements and attributes that enhance the presentation and functionality of your web pages.

Paris

Paris is the capital of France.

Paris

Paris is the capital of France.

Paris

Paris is the capital of France.

Paris

Paris is the capital of France.

Paris

Paris is the capital of France.

Paris

Paris is the capital of France.

Paris

Paris is the capital of France.