Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Java Example Java Applet What Exactly is HTML?

Related Tutorials


 
 

Share on Google+Share on Google+

What Exactly is HTML?

Advertisement
Now lets see what exactly is HTML (Hyper Text Markup Language). It is a type of data file which is transferred to the client machine.

What Exactly is HTML?

     

Now lets see what exactly is HTML (Hyper Text Markup Language). It is a type of data file which is transferred to the client machine. The HTML file gets translated and displayed on the screen  if the client is using a Web browser like Netscape Navigator, Microsoft Internet Explorer etc. Let me give you a brief description of HTML.

What is an HTML File?

  • HTML stands for Hyper Text Markup Language.
  • An HTML file is a text file containing small markup tags.
  • The markup tags tell the Web browser how to display the page.
  • An HTML file must have an htm or html file extension.
  • An HTML file can be created using a simple text editor.

Go ahead and try it!
If you are running Windows, start Notepad.
If you are using Mac, start SimpleText.
Start TextEdit in OSX and change the following preferences: Open the the "Format" menu and select "Plain text" instead of "Rich text". Then open the "Preferences" window under the "Text Edit" menu and select "Ignore rich text commands in HTML files". If you do not change the preferences above, your HTML code will probably not work. 

Type in the following text:

<html>
	<head><title>Title of page</title></head>
	<body>
		This is my first homepage. <b>This text is bold</b>
	</body>
</html><html>
	<head><title>Title of page</title></head>
	<body>
		This is my first homepage. <b>This text is bold</b>
	</body>
</html>

Save the file as "firstpage.htm". 



Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "firstpage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\firstpage.htm". Click OK, and the browser will display the page.

Lets have a look at print preview of the above example.

Description of the above Example.

We have started the HTML document by using the <html> tag and ended the same by using </html> tag. These two tags tell the browser about the starting and the ending of the document. Points to note:

  • Although header information doesn't not get displayed in the browser window, we have given the header information by using <html> and </html> tags.
  • Similarly we can give the title of the document by using the <title>, </title> tags which gets displayed in the browser's caption.
  • The <body> tag is used to give a body of the document to be displayed in the browser.
  • The text between the <b> and </b> tags is used to display the text in a bold font.

Remember, use either the .htm or the .html extension while saving an HTML file. Well, it is preferable to use .html extension.

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 14, 2007

Related Tutorials

Discuss: What Exactly is HTML?   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com