HTML

This lesson discusses HTML and its components.

HTML (HyperText Markup Language) is the standard markup language used to create web pages. It defines the structure of a web page using a series of elements. It contains the essential elements of a website, such as words, titles, and paragraphs, as well as links, images, and other media. HTML elements are represented by tags, which are enclosed in angle brackets. HTML forms the backbone of any webpage, dictating its structure and content.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>First Web Page</title>
</head>

<body>
    <h1>Hello, World!</h1>
    <p>Welcome to my website.</p>
</body>

</html>

The above code shows an example of an HTML document. An HTML boilerplate usually looks like this:

  • <!DOCTYPE html> - Defines the document type and version of HTML. In this case, it is HTML5.

  • <html> - Defines the root element of an HTML page.

  • <head> - Contains meta-information about the document, such as the title, character set, and viewport.

  • <body> - Contains the content of the document, such as headings, paragraphs, and images.