HTML Body (HTML Special Tags part 1)

১১/১৮/২০১১ ০৮:৫২:০০ AM | | 0 comments »

As we mentioned, the body tag serves as the element containing all the content for the website. Tables, Lists, Forms, Paragraphs, everything must be placed within the body element to be displayed on your site.

HTML - Body Margins

Unique Attributes
leftmargin
Sets a lefthand margin for your body element.
topmargin
Sets a margin along the top of your body element.

A unique set of margin attributes are available to the body tag. These attributes work much like those of a word processing program, allowing you set a pixel value margin for the left, right, top, or bottom of your website. Setting these attributes means that all the content you place within your body tags will honor the preset margin.

HTML Code:

<body topmargin="50">
<body leftmargin="50">

Margin Examples:

HTML - Base Text

The text attribute sets the text color of all text contained within the body tags. Think of it as a means to set the color of your text 'unless otherwise noted'. Basically you set a base color scheme and then you may use other means to modify the text color as needed in your site.

HTML Code:

<body text="red" >
or
<body text="rgb(255,0,0)" >

HTML - Base Links

Along the same lines, we may also specify base colors for visted or unvisted links. This method has deprecated, we recommend using Cascading Style Sheets instead.

HTML Code:

<body link="white" vlink="black" >

or
<body link="rgb(255,255,255)" vlink="rgb(0,0,0)" >
Setting a baselink is a great way to ensure your viewers will not receive that annoying error message that occurs with broken links.