HOME C C++ PYTHON JAVA HTML CSS JAVASCRIPT BOOTSTRAP JQUERY REACT PHP SQL AJAX JSON DATA SCIENCE AI

HTML Introduction


HTML (HyperText Markup Language) is the standard markup language used to create web pages.

It is the building block of web development and is essential for creating the structure and content of a website.

Introduction to HTML:

    • HTML stands for Hyper Text Markup Language
    • HTML is the standard markup language for creating Web pages
    • It describes the structure of a web page through a series of elements
    • HTML elements tell the browser how to display the content
    • HTML Extension is .html & .htm>

Setting Up Your Development Environment:

  • Text editors (e.g., Visual Studio Code, Sublime Text).
  • Web browsers for testing (e.g., Chrome, Firefox).

Basic HTML Document Structure:

  • <!DOCTYPE html>
  • <html>element
  • <head> and <title> elements
  • <body> element

A Simple HTML Document

Example

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Webpage</h1> <p>My first paragraph.</p>
</body> </html>
You can click on above box to edit the code and run again.

Output

My First Webpage

My first paragraph

Example Explained

What is an HTML Element?

An HTML element is defined by a start tag, some content, and an end tag:

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

The HTML element is everything from the start tag to the end tag:

<h1>My First Heading</h1>

<p>My first paragraph.</p>

Start tag Element content End tag
<h1> <p> <br>
My First Heading My first paragraph. none
</h1> </p> none

Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!

HTML Page Structure

Note: The content inside the <body> section will be displayed in a browser. The content inside the <title> element will be shown in the browser's title bar or in the page's tab.

HTML History

Since the early days of the World Wide Web, there have been many versions of HTML:

Year Version
1898 Tim Berners-Lee invented "World Wide Web".
1991 Tim Berners-Lee released the first version of the HTML specification (HTML 1.0).
1993 drafted the HTML+ specification, which was an extension of the original HTML (HyperText Markup Language).
1995 HTML Working Group defined HTML 2.0
1997 The HTML 4.0 specification was released by These day
1999 HTML 4.01 was the prevalent version during this time
2008 The Web Hypertext Application Technology Working Group (WHATWG) started the HTML5 initiative
2010 HTML5 Standardization : HTML5 standardization process from WHATWG.
2012 WHATWG HTML5 Living Standard
2014 Recommendation: HTML5
2016 Candidate Recommendation: HTML 5.1
2017 Recommendation: HTML5.1 2nd Edition
2019 HTML Living Standard: The "HTML Living Standard," reflecting its continuous evolution rather than periodic version updates.

This tutorial follows the latest HTML5 standard.