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>
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 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 of the page will be inserted between <title> 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.
List all the HTML versions