History of HTML
- HTML stands for Hypertext markup language.
- HTML is developed by Tim Berners-Lee at w3c (world wide web consortium) in the 1980s.
- HTML is used to create static web pages.
- A Website is the collection of web pages.
- So HTML is an essential part of any website.
Introduction to Web pages
- A web page is a piece of program that can be run over the internet through the browser.
- A browser is a application software used to run the web pages.
- A website or web application is the collection of web pages.
- A web page can be of two types
- Static Web pages
- Dynamic Web pages
Static web pages
Static web pages are those which don't change automatically, need to change manually.
For example, if you create a web page that shows current data and you have written a date like 14-Apr-2020, then if you open the web page after 10 days the same date 14-Apr-2020 will appear.
If you want to change the date, you need to edit your web page to update the date.
These types of pages are called static web pages.
Dynamic Web pages
Dynamic web pages are those that change automatically by using a program running in the background.
For example, if you create a web page that reads current date from your system or from a server and display on the web page then the date will automatically update day by day.
These types of web pages are called dynamic web pages.
HTML is used to create only static web pages. To create dynamic web page other programming languages like php, java, python, asp and many more are used along with HTML.
Tags in HTML
- Tags are the smallest entity that can be understood by the browser.
- Understanding tags and show the things as they are designed is called rendering.
- Tags are always written in angular brackets (<>).
- Each text is marked with a tag in HTML and displayed by the browser accordingly. For example, a text marked with <h1> tag is displayed as heading and text marked with <p> tag is displayed as a paragraph tag.
- Because everything is marked with any tag according to the purpose, so HTML is known as markup language.
- Tags can be divided into two categories...
- Paired tags
- Empty tags
- Paired tags are those which always starts with an opening tag and ends with a closing tag.
- Opening and closing tags are identical the only difference is that closing tag is prefixed with slash(/) sign.
- Any text that needs to marked with a paired tag is written between opening and closing tag, so these tags are also known as container tags.
- As shown in the above figure, opening tag + content + closing tag are combinedly called an element.
- For example, <html>...</html> is a paired tag.
- Empty tags are those which need not be closed explicitly.
- Empty tags are closed automatically, so these tags are also known as self-closing tags.
- For example, <br> is an empty tag.