Introduction to HTML
What is HTML?
HyperText Markup Language(HTML) is used for creating webpages. It describes the structure of a webpage.
Learning HTML is the first step before entering into the web designing and development. HTML is a very easy to learn. Incoming articles contain basic information about HTML. After learning this you can learn more advance topics.
History of HTML
Tim Berners-Lee was the man behind HTML. HTML has gone through a lot of development stages. Latest version is HTML 5. Different milestones in HTML development are as follows:
|HTML||1991||First version of HTML with limited tags|
|HTML+||1993||Proposed extension to HTML|
|HTML 2.0||1995||New tags were added but still missing support for tables and align attributes|
|HTML 3.2||1997||Supported tables, image, heading and other element ALIGN attributes but missing support for frames, applets and embed tag|
|XHTML 1.0||2000||More cleaner and stricter version|
|HTML 5||2012||Supports web storage, audio, video and canvas elements|
|XHTML 5||2013||More advanced version(still in its development stage)|
Tools for writing HTML documents
There are many tools and editors available for writing HTML. Few of them are as follows:
- Adobe Dreamweaver(commercial)
- CoffeeCup HTML Editor
For learning purpose one should use notepad++. Its free, display line numbers and indentation. Moreover, newer versions of notepad++ contains intelli-sense support, which means it can recognize pre-defined tags and keywords of many languages including HTML, CSS, PHP etc.
Extension of an HTML Document
HTML documents can have .html or .htm extension. So while saving your html document make sure that you put .html or .htm at the end of your file name.
Structure of an HTML Document
Here's the basic structure of an html document:
<!DOCTYPE html> <html> <head> <title>my title</title> </head> <body> content goes here </body> </html>
Tags, Elements and Attributes
- Tags : html tags are the main building blocks for creating web pages.
These are predefined and can be an opening tag or closing tag.
Note: Last opening tag is closed first.
- Elements :
First a tag is opened, after that we put the content and then close the tag. This whole thing from opening tag to closing tag is known as html element.
- Attributes :
html attributes specifies additional properties to an html element.
<a href="mypage.html">click me</a>Here, <a> and </a> are tags.
<a> is opening tag and </a> is closing tag.
<a href="mypage.html">click me</a> as a whole is an html element.
href inside anchor tag is an attribute.
Things to do
- Try different editors and choose the one that best suites your requirement.
- If unable to decide then simply use notepad or notepad++.
- Create a folder named "html" at a suitable location on your computer.
- You are going to save your files in this folder.