HTML Tutorial - Detailed Notes

Introduction to HTML

HTML (HyperText Markup Language) is the standard language for creating web pages and web applications. It provides the structure of a web document and is used to describe the elements within the document, such as headings, paragraphs, links, and images.

History of HTML

HTML was created by Tim Berners-Lee in 1991 as a means to publish documents on the World Wide Web. Since then, it has evolved through various versions to include more functionality and features.

HTML Editors

HTML can be written in any text editor, but there are specialized HTML editors that provide features like syntax highlighting and code completion. Some popular HTML editors include:

HTML Basic Structure

Every HTML document starts with a declaration of the document type followed by the <html> element. Inside this element, there are two main sections: the <head> and <body>. The <head> contains meta-information about the document, while the <body> contains the content that is displayed on the web page.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Document Title</title>
    </head>
    <body>
        <h1>Hello World!</h1>
        <p>Welcome to my website.</p>
    </body>
</html>

HTML Elements

HTML elements are the building blocks of an HTML page. An element typically consists of an opening tag, content, and a closing tag. For example:

<p>This is a paragraph.</p>

The above code creates a paragraph element with the text "This is a paragraph."