HTML Study Material

What is HTML?

  • HTML stands for Hyper Text Markup Language..
  • HTML is the standard markup language for creating web pages.
  • HTML describes the structure of a web page: headings, paragraphs, links, images, tables, forms.
  • HTML consists of a series of elements, which tell the browser how to display the content.

A Simple HTML Document

Example

Every web page you have ever opened is built on a document like this one:

<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

Result

Example Explained

PartMeaning
<!DOCTYPE html>declares that this document is an HTML5 document
<html>the root element of the page
<head>meta information about the page (not shown in the page itself)
<title>the title shown in the browser tab
<body>the visible content: headings, paragraphs, images, links...
<h1>a large heading
<p>a paragraph

HTML, CSS and JavaScript

Web pages are built with three languages that work together:

LanguageRoleAnalogy
HTMLstructure and contentthe walls and rooms of a house
CSSpresentation: colors, fonts, layoutthe paint and furniture
JavaScriptbehaviour and interactivitythe electricity: lights, doors that open

Note: HTML is a markup language, not a programming language: it has no variables, loops or logic.