The <body> tag, originally designed to delimit the body of the document, has been extended to include controls for the backgrounds and text colors of a document. These settings are global, meaning they apply to the entire
document. While these controls are currently well supported by major
browsers, be aware that they have been deprecated by the HTML 4.01 specification and will eventually be phased out of use in favor of style sheet controls.
You can use the <body> tag to set colors for the document's background and text elements (see Table). Specified link colors apply to linked text and also to the border around linked graphics.
Table: Attributes for specifying colors with the <body> tag
A single <body> tag can contain a number of specific attributes, as shown here:<BODY BGCOLOR="color" TEXT="color" LINK="color" VLINK="color" ALINK="color">
Tiling Background Graphics
You've probably seen web pages that have a graphic image repeating behind the text. These are called background tiles or tiling graphics, and they are added to the document via the <body> tag using the background attribute and the URL of the graphic as follows:
Any web-based graphic file format (such as GIF or JPEG) can be used as a background tile (some new browsers even support animated GIFs in the background). Following are a few guidelines and tips regarding the use of background tiles:
Adjusting Browser Margins
By default, browsers insert a margin of 10 to 12 pixels (depending on the browser and platform) between the edge of the browser window and the document's contents. There is no method for changing these margins using tags from the HTML 4.01 specification alone (the W3C prefers style sheets adjusting margins); however, there are browser specific attributes that can be added to the <body> tag that increase or decrease the margin width.
The drawback is that Internet Explorer and Netscape Navigator use different attributes to control margins. In addition, Netscape's tags only work with version 4.0 and higher. If you want to reach a broader audience, you can use frames for a similar effect.
Internet Explorer uses the attributes leftmargin , rightmargin, topmargin, and bottommargin to specify pixel widths for the respective margins in the browser window. Navigator 4.0 and higher uses marginwidth (to adjust the left and right margins) and marginheight (for top and bottom margins).
For all these attributes, the value is a pixel measurement. The margin may be removed completely, allowing objects to sit flush against the window, by setting the attribute values to 0. Be aware that there is a bug in Navigator 4.x that inserts a 1-pixel border even when the margins are set to zero.
To set margins for both browsers, it is necessary to duplicate attributes. In the following example, the margins are turned off on the top and left edges using two sets of proprietary attributes:<BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0>
Web Designing Related Interview Questions
|HTML Interview Questions||HTML 5 Interview Questions|
|Flash Interview Questions||Graphic Design Interview Questions|
|Illustrator Interview Questions||Dreamweaver Interview Questions|
|UI Developer Interview Questions||Dreamweaver CS3 Interview Questions|
|CSS Advanced Interview Questions||Web Developer Guide Interview Questions|
|Log Shipping Interview Questions||Spring Boot Interview Questions|
|UI Designer Interview Questions||Bootstrap 4 Interview Questions|
Web Designing Related Practice Tests
|HTML Practice Tests||HTML 5 Practice Tests|
|Flash Practice Tests||Graphic Design Practice Tests|
|Illustrator Practice Tests||Dreamweaver Practice Tests|
|UI Developer Practice Tests||Dreamweaver CS3 Practice Tests|
|Web Developer Guide Practice Tests||Advanced jQuery Practice Tests|
Web Designing Tutorial
Designing For A Variety Of Browsers
Designing For A Variety Of Displays
Web Design Principles For Print Designers
A Beginners Guide To The Server
Printing From The Web
Structural Html Tags
Adding Images And Other Page Elements
Specifying Color In Html
Cascading Style Sheets
Server Side Includes
Designing Graphics With The Web Palette
Audio On The Web
Video On The Web
Flash And Shockwave
Introduction To Smil
Introduction To Dhtml
Introduction To Xml
Wap And Wml
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.