Chapter 1. Introduction to HTML

HTML stands for Hyper Text Markup Language and it is introduced by Tim Berners-Lee and he released the basic version of HTML publicly on 1991. HTML will run through World Wide Web (WWW) platform.

Requirement for writing the HTML code and testing the code

  • Need the device where you can able to open any text editor and write the code in it. Usually people go for bigger size computer or laptop to write the code.
  • Using notepad in windows or in MAC using textEdit can write the HTML code. In the internet there are lots of free editors available. Notepad++, Brackets, Sublime Text, etc
  • HTML code can be test using any browsers like Internet explorer, Mozilla Firefox, Google Chrome, Opera, etc

Basic structure of HTML

 <!DOCTYPE html> <html> <head> 	<!-- This can be seen in browser bar--> 	<title>Title of the page</title> </head> <body> 	<!-- Visible to the user --> 	<p> My first web page </p> </body> </html>

try it yourself

HTML Tags format: Open and close by angle brackets <..></..>

Most of the HTML tags are come with pairs, written with start (open) <…> and end (close) tags </…> and the tags are closed by angle brackets <>. End tags have the open and close angle brackets but it has forward slash inserted immediately after the open angle bracket. Find the demo below

<tagname> Inner declarations or content will goes here </tagname>

<!DOCTYPE html>

HTML page should be start with <!doctype html> and it should be placed in the top most place of the html code, where the browser will easily identify the version of HTML page. The above example doctype is HTML 5 which is latest version.

<HTML> tag

<html></html> is the parent of all other html tags Except <!DOCTYPE html> all other tags will go inside between the HTML tags.

<head> Tag

<head> tag is holds the information about the HTML page. Like Title tag and other optional tags are declared inside the head tag. Optional tags are meta, link, script, etc. <head> tag can be declared one per html page. <head> tag is like human head, where other can easily can identyfy the person, same like browser can easily gather information about the HTML page. <head> tag should be declared immediately after the opening of the <head> tag.

<title> tag

Title of the page will be inserted between <title> tag.

<body> tag

All visual representation elements will have written inside between <body></body> tag. Example: block elements (p,div), images and non-block elements (span,em)

Compare HTML with human body

In my starting stage of learning the HTML, I used to compare the HTML structure with human body. Find the image below.

HTML Structure example

List all the HTML versions

VersionsYear
HTML1991
HTML 2.01995
HTML 3.21997
HTML 4.01998
HTML 4.011999
XHTML2000
HTML 52014
W3TWEAKS
Latest posts by W3TWEAKS (see all)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *