HTMLisamarkupla
HTMLisamarkupla
2. Historical Background
HTML was created by Tim Berners-Lee in 1991 as a means to share
information via documents that are interconnected by hyperlinks.
Since then, it has evolved significantly:
● HTML 2.0 (1995): The first official version.
● HTML 4.01 (1999): Introduced more formatting capabilities.
● XHTML (early 2000s): A stricter, XML-based version.
● HTML5 (2014): A major update with support for multimedia,
semantic elements, and APIs.
● HTML5 is the current standard and is maintained by the W3C
(World Wide Web Consortium) and WHATWG (Web Hypertext
Application Technology Working Group).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page Title</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is a paragraph.</p>
</body>
</html>
<!DOCTYPE html>: Declares the document type.
<html>: The root of the HTML document.
<head>: Contains meta-information, links to stylesheets, and
scripts.
<body>: Contains the content displayed on the web page.
5. Attributes
Attributes provide additional information about elements. They are
always included in the opening tag:
<a href="https://example.com" target="_blank">Visit Example</a>
href: Specifies the link’s destination.
target="_blank": Opens the link in a new tab.
6. HTML5 Semantic Elements
HTML5 introduced semantic elements to give meaning to the
structure:
<header>: Introductory content or navigation.
<nav>: Contains navigation links.
<main>: Main content area.
<section>: A thematic grouping of content.
<article>: Independent, self-contained content.
<aside>: Side content like ads or widgets.
<footer>: Footer information like contact or copyright.
Semantic HTML improves accessibility, SEO, and code clarity.
7. Multimedia in HTML
HTML5 made it easy to embed multimedia without third-party
plugins:
Images: <img
Audio: <audio controls> <source src="audio.mp3"> </audio>
Video: <video controls> <source src="video.mp4"> </video>