HTML, which stands for HyperText Markup Language, is the standard markup language for creating web pages and web applications. It describes the structure of a web page semantically and originally included cues for the appearance of the document.
Structure of an HTML Document
An HTML document is structured with a few basic elements:
<!DOCTYPE html>
: This declaration defines the document type and version of HTML. For HTML5, it's simply<!DOCTYPE html>
.<html>
: The root element that encloses all the content of your HTML document.<head>
: Contains meta-information about the document, like its title and links to CSS files.<body>
: Contains the content of the document, like text, images, links, and other elements.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Basics</title>
</head>
<body>
<!-- Content goes here -->
</body>
</html>
Basic HTML Elements
Here are some basic HTML elements you should know:
<h1>
to<h6>
: These are heading elements, used to define the structure of the document.<h1>
is the highest level heading.<p>
: Paragraph element, used to define a paragraph.<a>
: Anchor element, used to create a hyperlink.<img>
: Image element, used to embed an image into the page.
<h1>Welcome to the World Wide Web</h1>
<p>This is an example of a paragraph.</p>
<a href="https://www.example.com">Visit Example.com</a>
<img src="https://cloud-image.ullrai.com/q/web/" alt="Web" />
Learning Resources
For more information on HTML, you can visit the following resources:
HTML