Set your Publisher ID in src/config/ads.ts to display live ads.
HTML Introduction
What is HTML and how does the World Wide Web work?
HTML stands for Hyper Text Markup Language. It is the standard markup language used by every browser on earth to structure web pages.
What is HTML?
HTML is the skeleton of every website. Just as bones give shape to the human body, HTML gives structure to web content.
HTML describes the structure of a Web page using markup tags.
HTML elements tell the browser how to display the content, designating headings, paragraphs, images, links, tables, and buttons.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to Codexia</h1>
<p>This is my first paragraph on the web!</p>
<a href="https://google.com" target="_blank">Visit Google</a>
</body>
</html>The <!DOCTYPE html> declaration represents the document type and helps browsers display web pages correctly. It must only appear once at the very top.
Understanding HTML Elements
An HTML element is defined by a start tag, some content, and an end tag: <tagname> Content goes here... </tagname>.
HTML tags normally come in pairs like <p> and </p>. The first tag in a pair is the start tag, the second tag is the end tag.
Some HTML elements have no content and are called empty elements (such as <br> for a line break or <img> for an image).
| Tag | Description |
|---|---|
| <!DOCTYPE html> | Defines that this document is an HTML5 document |
| <html> | The root element of an HTML page |
| <head> | Contains meta information about the HTML page (title, styles, charset) |
| <title> | Specifies a title for the HTML page shown in the browser tab |
| <body> | Defines the document body, and is a container for all visible contents |
| <h1> | Defines a large heading |
| <p> | Defines a paragraph |
Set your Publisher ID in src/config/ads.ts to display live ads.
Test Yourself With Exercise
Which HTML tag is used to define the root container of an HTML page?