HTML (HyperText Markup Language) provides the structure of a web page,
while CSS (Cascading Style Sheets) controls its presentation and styling.
HTML, or HyperText Markup Language, is the foundational language for
creating and structuring content on the World Wide Web.
It is a markup language, not a programming language, meaning it uses
tags to define the structure and presentation of content within a web browser.
Basic HTML Structure:
A fundamental HTML document includes the following elements:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Web Page</title>
<link rel="stylesheet" href="style.css"> <!-- Linking an external CSS file -->
</head>
<body>
<header>
<h1>Welcome to My Page</h1>
</header>
<main>
<section>
<p>This is a paragraph of text.</p>
</section>
</main>
<footer>
<p>© 2025 My Website</p>
</footer>
</body>
</html>
<!DOCTYPE html>: Declares the document type as HTML5.
<html lang="en">: The root element, indicating the document is HTML and its
language is English.
<head>: Contains meta-information about the page (not displayed on the page
itself),
such as character set, viewport settings, title, and links to external resources
like CSS files.
<body>: Contains the visible content of the web page.
<header>, <main>, <footer>, <section>: Semantic elements that provide structure and
meaning to the content.
<h1>, <p>: Heading and paragraph elements for text content.