What is HTML
Introduction to HTML
HTML: Stands for Hyper Text Markup Language.
It is the standard markup language for creating web pages.
HTML describes the structure of a web page through a series of elements.
Elements label pieces of content, telling the browser how to display it (e.g., headings, paragraphs, links).
Example of a Simple HTML Document
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>Explanation of the Example
<!DOCTYPE html>: Declaration that defines the document as HTML5.
<html>: Root element of the HTML page.
<head>: Contains meta information about the page.
<title>: Specifies the title shown in the browser's title bar or tab.
<body>: Contains all visible content such as headings, paragraphs, images, etc.
Understanding HTML Elements
<h1>: Defines a large heading.
<p>: Defines a paragraph.
Definition of an HTML Element
An HTML element is defined by a start tag, content, and an end tag:
<tagname> Content goes here... </tagname>Example:
Start tag: <h1>
Element content: My First Heading
End tag: </h1>
The Role of Web Browsers
Web browsers (Chrome, Edge, Firefox, Safari) read HTML documents and display them correctly.
Browsers do not display HTML tags; they use them to render the document visually.
HTML Page Structure
Visualization of an HTML Structure
<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>Important Notes
Content inside the <body> section is displayed in the browser.
Content inside the <title> element appears in the browser's title bar or in the page's tab.
History of HTML
1989: Tim Berners-Lee invented the World Wide Web.
1991: Tim Berners-Lee invented HTML.
1993: HTML+ drafted by Dave Raggett.
1995: HTML 2.0 defined by the HTML Working Group.
1997: W3C Recommendation: HTML 3.2.
1999: W3C Recommendation: HTML 4.01.
2000: XHTML 1.0 recommended by W3C.
2008: WHATWG HTML5 First Public Draft.
2012: WHATWG HTML5 Living Standard.
2014: W3C Recommendation: HTML5.
2016: W3C Candidate Recommendation: HTML 5.1.
2017: W3C Recommendation: HTML5.1 2nd Edition.
2017: W3C Recommendation: HTML5.2.