Lesson 3: How to use Body tag in HTML Document
- Sunday, February 1, 2009, 11:29
- Programming
- 1,404 views
- 2 comments
Body tag hold the major portion of contents in HTML documents, it handles all the appearance of web page. There are different tags used within the body tag pairs to render the web page. You need to learn how to use these tags at two different levels.
1.In creating eye catching pages that communicate the desired information to the reader.
2.in creating easy-to-read HTML documents that other web weavers can readily understand and,if necessary,easily modified.
The contents in the body portion of the document are unformatted, line break in the notepad does not mean it will displayed in the new line when you view the page in the browser. All the formatting between the body tags can be handled through other tags.
Let me show you the example.
<html>
<head>
<title>
My Webpage
</title>
</head>
<body>
Welcome to sooper tutorials!
Free Online Tutorials
</body>
</html>
Save the page on desktop with the name filename of (body.htm) and double click on browser icon with the name of file.
As shown in the figure both the sentences are displayed on the same line although the formatting is different in notepad but browser can’t read the formatting of any text editor tags are required to change the formatting.
About the Author
Related Tutorials & Articles
HTML document is a simple text file enclosed tags and text. Before starting progress in HTML following pre-requisites are required to work in HTML. -Operating System -Notepad or any other text editor for writing HTML. - Browser for viewing the results of HTML After fulfilling the requirement you can start you hands own on HTML. Working in HTML is...Read more
As discussed in Lesson 3, contents in the body portion of html document are unformatted. In lesson 3 we applied line break from notepad but it does not work. This tutorial will teach you how to apply line breaks in html document. <BR> is not the container tag its a single tag used for line break....Read more
The <HR> element in html create an horizontal line or rule across the screen. <HR> is called an empty tag, although it have four attribute to change default way the rule appears on screen. This tag is called an empty tag because there is not ending tag or closing tag. Look at the simple use...Read more
HTML is capable to embed images in a webpage; it can be done by using html tag <img>. Image tag is not a container tag means there is no closing tag but it has several attributes. Tag Syntax <img src=”picpath” height=”10” width=”20” alt=”image description” align=> Src Src attribute of image tag defines source of image, src is always set...Read more
The background attribute allows you to place image or picture on background of your page. The background is most commonly used attribute of <body>,<table> element. When background tag within body tag it repeat the image to fill whole web page background.It’s a good practice to use small size images because huge size image take time...Read more
2 Comments on “Lesson 3: How to use Body tag in HTML Document”
Trackbacks
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!
























Thanks for putting this together. For me, it’s all about cheat sheets. I always have my iPhone with me, so I keep them there for handy reference - even offline. The best HTML cheat sheet I’ve found so far is from these guys:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=303696538&mt=8
It has all of the elements, entities, colors and more. They also have great cheat sheets for CSS and Javascript. Hope this is helpful.