HTML Introduction


What is HTML?

The language used to develop web pages is called HyperText Markup Language (HTML). HTML is the language interpreted by a Browser. Web pages are also called HTML document. HTML is set of special coded that can be embedded in text to add formatting and linking information. HTML is specified as TAGS is a HTML document.

HTML is the standard markup language for creating Web pages.

  • HTML stands for Hyper Text Markup Language
  • HTML describes the structure of Web pages using markup
  • HTML elements are the building blocks of HTML pages
  • HTML elements are represented by tags

This is the original way in which HTML was conceived

  1. The browser sends a request to the server, asking for a web page such as index.html
  2. The server sends the web page back to the browser
  3. The browser displays the web page

Basic HTML Document

Example

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

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

</body>
</html>

Copy above code & try it into your natepad


Example Explained

  • <!DOCTYPE html> declaration defines this document to be HTML5
  • <html> element is the root element of an HTML page
  • <head> element contains meta information about the document
  • <title> element specifies a title for the document
  • <body> element contains the visible page content
  • <h1> element defines a large heading
  • <p> element defines a paragraph

HTML Tags

Tags are instruction that are embedded directly into the text of the document. An HTML tag is a signal to a browser that it should do something other than just throw text up on the screen. By convention all HTML tags begin with an open angle bracket (<) and end with a close angle brackets.

There are two types of html tags.

Paired Tags: In Paired Tags, the first tag ( <p> ) is often called the opening tag and second tage ( </p> ) is called the closing tag

Example: <p>This the dummy text.</p>

Singular Tags: This tag doesn’t have a companion tag.

Example: <br/>

Tip: The start tag is also called the opening tag, and the end tag the closing tag.


Web Client/Web Browsers

To access information stored in the form of web pages, user must connect to a Web Server. Once connected, an interface that displays the contents of the web pages is required.

Computer that offer the facility to read information stored in web pages are called web client’s.

Web Clients run special software called a ‘Browser’ that allow them to:

  • Connect to a server.
  • Query the server for the information to be read.
  • Provides an interface to read the information returned by the Server.

The browser does not display the HTML tags, but uses them to determine how to display the document:



HTML Page Structure

Below is a visualization of an HTML page structure:

<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>

Note: Only the content inside the section (the white area above) is displayed in a browser.


<!DOCTYPE> Declaration

The declaration is used to inform a website visitor's browser that the document being rendered is an HTML document. While not actually an HTML element itself, every HTML document should being with a DOCTYPE declaration to be compliant with HTML standards.

The <!DOCTYPE> declaration for HTML5 is: <!DOCTYPE html>


HTML Versions

Version Year
HTML 1991
HTML 2.0 1995
HTML 3.2 1997
HTML 4.01 1999
XHTML 2000
HTML5 2014


Copyright © 2020. All rights reserved.