HTML

Short for Hyper Text Markup Language

  • Creates webpages.

    → Describes structure of webpage

  • Consists of various elements
    → Elements tell browser how to display content.
    → Elements label content such as “This is a heading”, “This is a paragraph”, etc..

HTML elements

<!DOCTYPE html> → Declares the document is an HTML5 Document

<html> → Roof element

<head> → Contains meta information about HTML page

<title> → Title of HTML Page (shown in browser’s title bar or in page’s tab)

<body> → Defines document’s body, contains all visible content : images, paragraphs, hyperlinks, etc.

<h1> → Defines large heading

<p> → Defines paragraph

HTML Elements are defined by…

  • Start Tag

  • Content

  • End Tag

    <tagname> Content goes here... </tagname>

e.g.
<h1>My First Heading</h1>

<p>My first paragraph.</p>

Some Elements don’t have content. (<br> element).

  • These are called empty elements → Don’t have end tag


Web Browser

→ Reads HTML documents and displays them correctly.

→ Browser doesn’t display HTML Tags but uses them to display document.