Saturday, February 12, 2011

HTML - My First Page!

HTML stands for HyperText Markup Language.
Its called HyperText Markup Language because it is a language used to develop web pages (which are also called HyperText pages as they are linked to each other) and its written using tags.


A tag is written with two angle brackets and an HTML keyword. For ex. <BODY> is a tag.
An HTML code page is full of tags which allow you to mold and shape your page to any design that you see fit.


Any editor can be used to write the HTML code: Visual Studio IDE, MS-WORD, Word-Pad or even the NotePad. Once written the file is stored with a .html or .htm extension and this file (page) can be opened with any of your browsers. Browsers are design to interpret HTML code (tags) and render the web page accordingly.


To start with... Open your NotePad and write this code:



<HTML>
   <BODY>
      Welcome to the world of HTML.
   </BODY>
</HTML>

Store this file with .html extension, like myFirstPage.html
If you open up the folder with the file, oyu will see the file with a web page file type symbol. If crome is your browser it will look like:


Open this page and you will see a web page like:



Congratulations! You just created your first HTML web page.

We used a few tags here.
<HTML> is the fist one. This tag tells the browser to treat the page as an HTML page and interpret it that way.
</HTML> is the last one. Yes as you may have rightly guessed its the closing pair. Almost every tag in HTML needs a closing pair. Its like we are marking the scope of the tag. Any tag is effective till it encounters its closing pair.


Next tag we used is <BODY>. This is where you put all the stuff you want to see on your web page. All your text, all the images etc.
Now, its easy to put text on your page. Simply write it in in between the <BODY></BODY> tags and it appears on the page. Its formatting of this text that is tricky.

No comments:

Post a Comment

Please leave a comment if you have anything to say or have something to ask.. I will do my best to answer..