HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. HTML provides the foundation for web pages by organizing text, images, links, and other media. It uses tags to define elements like headings, paragraphs, lists, and more. HTML is essential for creating the structure of a webpage, but it does not control the design or interactivity – that’s handled by other technologies like CSS and JavaScript.
Content Layer (HTML)
This layer involves the structure and content of the webpage.
It includes text, images, links, tables, and other multimedia elements.
HTML is used to organize the content logically, making it accessible and easy to read.
Presentation Layer (CSS)
This layer is responsible for the visual appearance and layout of the webpage.
It defines styles such as colors, fonts, spacing, and positioning of elements.
CSS (Cascading Style Sheets) is used to enhance the look of the HTML content.
Behavior Layer (JavaScript)
This layer adds interactivity and dynamic functionality to the webpage.
It handles user interactions like clicks, form submissions, and animations.
JavaScript is used to control the behavior of the webpage, making it more interactive and engaging.
This example demonstrates a basic webpage with a heading, a paragraph, and a link. It shows how the content layer (HTML) is structured.
<!DOCTYPE html>
<html>
<head>
<title>Introduction to HTML</title>
</head>
<body>
<h1>Welcome to My Webpage</h1>
<p>This is a simple example of an HTML webpage.</p>
<p>HTML helps in organizing content effectively.</p>
<a href="https://www.example.com">Visit Example</a>
</body>
</html>
<!DOCTYPE html>: Defines the document type and version of HTML used.
<html>: Root element of the HTML document.
<head>: Contains meta-information like the title of the webpage.
<title>: Specifies the title that appears in the browser tab.
<body>: Contains the main content displayed on the webpage.
<h1>: Heading tag used for the main title.
<p>: Paragraph tag used for text content.
<a>: Anchor tag used to create a hyperlink.