|
|
HTML Code TutorialTutor Ebook Download The Body Tag<body></body>
The body tag is a required HTML tag. It is only omitted when using frames. All code for structuring your HTML page is placed within the opening and closing body tags. Many current web design tools still use this outdated method of assigning attributes to the body tag. When building web pages for w3c compliance today, these attributes should be assigned using CSS (Style Sheets). The Outdated Methods
<body link="#FFFCCC" alink="#FFCCFF" vlink="#FFCCFC"
background="nerd.gif" bgcolor="#FFFFFF"
text="#CCCCCC">
Attributes of the body tag were:
The link, alink and vlink, attributes set the colors that hyperlinks will appear in.
Link sets the color of unused links. The Background attribute was used to show the location of the desired background image or colored pattern for the page. It is usually a gif or jpg file. If not located on the same server and in the same directory as the parent program , you must specify a path. You can also access
another site to display the background for your page.
Setting Link Colors with Style SheetsLink colors can be set using Style sheets. Code for setting link colors: How do they do that? Ever wondered how they get links to change color when the mouse is positioned over them? Use the hover selector and assign a fore and background color. |
Contents Table of ContentsIntroduction Page Structure Basic HTML PageDoctype The Body Tag The Header Tag The Division Tag Horizontal Rule Anchor Tag Anchor Tag - Intradocument Anchor Tag - Image Using Borders The ID Attribute Meta Tags Text Controls Style SheetsWorking With Fonts The Paragraph Tag Paragraphs-Images Using Lists The Pre Tag Line Break Tag Tables Basics of TablesColspan Forms Form BasicsCheck Boxes Text Boxes Selection Boxes Frames Basic FramesTarget and Scrolling Search Engines Miscellaneous Buttons with CSSUsing Color Color Chart Using Images Using Templates Uploading HTML pages. HTML-CSS Quizzes |
|
Note: These colors are set by default. It is not necessary to provide this code unless you want to change the defaults. For CSS2 compliance always specify a background color when you specify a fore-color. Setting the Background Image with Style SheetsThe background image and its attributes can also be set using style sheets. The default setting tiles the image on the page or repeats it many times covering the entire area. There are settings to control this feature. Code for specifying image Note: This code would repeat the image by default. Code to control repeat of image To display image one time To repeat image across top margin of page To repeat image down left margin of page Here's a useful attribute of the background declaration. If you don't want your background to scroll on the screen - you want the background fixed and the text to scroll over it, use this code: Changing Scrollbar ColorsAnother attribute of the body which can be controlled is the scrollbar. Change the color and other features with this code: Setting Background Color with Style SheetsThe code for setting background color for the body: The background-color attribute can be used with the body tag, table tag, row tag, cell tag, header tag and most others. In most cases you should also specify a forecolor for CSS2 compliance. Text and Style SheetsText attributes are set individually using Style Sheets. Different settings can be specified for paragraphs, lists, blockquotes, pre, etc. |
|
|