Basic HTML Document
Every HTML document begins with a document type declaration, setting the foundation for the webpage. This section introduces basic HTML tags that structure the page, such as <head>, <body>, and <title>. Although this is not mandatory, it is a good convention to start the document with the below-mentioned tag.
Below mentioned are the basic HTML tags that divide the whole page into various parts like head, body, etc.
Basic HTML Tags for Document Structure | |
---|---|
Tags | Descriptions |
<html> | Encloses the entire HTML document, serving as the root element for all HTML content. |
<head> | Contains header information about the webpage, including title, meta tags, and linked stylesheets. It is part of the document’s structure but is not displayed on the webpage. |
<title> | Used within the <head> section to define the title of the HTML document. It appears in the browser tab or window and provides a brief description of the webpage’s content. |
<body> | Encloses the visible content of the webpage, such as text, images, audio, videos, and links. All elements within this tag are displayed on the actual webpage when viewed in a browser. |
Example 1: To illustrates the Basic HTML structure.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title>HTML</title>
</head>
<body>
<!--Contents of the webpage-->
<p>w3wiki is a online study platform</p>
</body>
</html>
Output:
HTML Basics
HTML stands for Hyper Text Markup Language. It is the standard markup language for creating Websites. It is used to describe the structure of a Web page. HTML consists of elements that tell the browser how the content is displayed on the screen. We’ll walk you through fundamental HTML examples and teach you how to create a webpage. This HTML Basics covers fundamental HTML examples.
In this guide, the basics of HTML include learning HTML tags ( <h1>, <p>, <img>, etc), attributes, elements, and document structure which collectively form a working web page.
Table of Content
- Basic HTML Document
- HTML Headings
- HTML Paragraph and Break Elements
- HTML Horizontal Line
- HTML Images
- View HTML Source Code