Lecture

html Tag

The <html> tag indicates the start and end of a web document.

Before declaring the html tag, a DOCTYPE is declared to let the browser know what version of HTML the page is made with.

The widely used version of HTML on the internet today is HTML5, and you specify it at the top of the HTML document with <!DOCTYPE html> to indicate that it is an HTML5 document.

Declaring DOCTYPE
<!DOCTYPE html> <html> <!-- HTML Code --> </html>

Note: Since its inception in 1991, HTML has been released in various versions. The major versions of HTML are as follows.

HTML (1991)

The original version of HTML was introduced by Tim Berners-Lee, the founder of the World Wide Web.

HTML 2.0 (1995)

The first standard version of HTML, improved based on feedback from members of the web community.

HTML 3.2 (1997)

JavaScript was added to control the behavior of web pages.

HTML 4.0 (1997)

Stylesheets (CSS) for styling webpages and enhanced input forms were added.

HTML5 (2014, current version)

Tags like <canvas>, <video>, <audio> were introduced, and modern features like localStorage that act as storage in web browsers were added.


<html> Tag

The html tag serves as the root element of an HTML document and should be at the very start and end of the document.

Within the <html> tag, it includes the <head> tag, which contains information about the web page, and the <body> tag, which contains the content to be displayed on the webpage.


Internal Structure of HTML Tag

Basic HTML Document Structure
<!DOCTYPE html> <html> <head> <!-- Include document metadata, styles, scripts, etc. here. --> </head> <body> <!-- Insert the content of the page to be visible to users here. --> </body> </html>

The HTML tag can specify the main language of the webpage using the lang attribute.

For example, a webpage using English as the main language can be specified as <html lang="en">.


Example of HTML lang Attribute Use
<!DOCTYPE html> <!-- Using lang attribute for English --> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Webpage Title</title> </head> <body> <h1>Section Title</h1> <p>Section Content</p> </body> </html>
Mission
0 / 1

An HTML document must have the <html> tag at the very top.

True
False

Lecture

AI Tutor

Publish

Design

Upload

Notes

Favorites

Help