HTML
HTML
• HTML:
Hypertext Markup Language (HTML) is the standard markup language for creating web pages
and web applications. With Cascading Style Sheets (CSS) and JavaScript, it forms a triad of
cornerstone technologies for the World Wide Web.
Web browsers receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages. HTML describes the structure of a web page
semantically and originally included cues for the appearance of the document.
• HTML tag
An HTML tag is commonly defined as a set of characters constituting a formatted command for
a Web page. At the core of HTML, tags provide the directions or recipes for the visual content
that one sees on the Web.
In HTML 4.01, the <!DOCTYPE> declaration refers to a DTD, because HTML 4.01 was
based on SGML. The DTD specifies the rules for the markup language, so that the browsers
render the content correctly.
HTML5 is not based on SGML, and therefore does not require a reference to a DTD.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
Eample:
<!DOCTYPE HTML>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML Reference</title>
</head>
<body>
The content of the document......
</body>
</html>
5. HTML <body> Tag
The <body> tag defines the document's body.
The <body> element contains all the contents of an HTML document, such as text,
hyperlinks, images, tables, lists, etc.
Example:
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
Example:
<p>This is some text in a paragraph.</p>
Example:
<!--This is a comment. Comments are not displayed in the browser-->
<p>This is a paragraph.</p>