Html: Using Fieldset and Legend

Fieldsets are similar to an html box. When you write text inside the fieldset, the browser interprets the fieldset code and will convert it to an html box. The fieldset can also be customized in terms of width, heights, border width, color, etc. Below is an example that illustrates the use of a fieldset:

<html>
<body>
<fieldset>
There was a boy A very strange, enchanted boy They say he wandered very far Very far, over land and sea A little shy and sad of eye But very wise was he </fieldset>
</body>
</html>


Preview:

There was a boy A very strange, enchanted boy They say he wandered very far Very far, over land and sea A little shy and sad of eye But very wise was he

You can add a title that defines your fieldset or its content by using the legend tags. Here is an example that illustrates the use of legends.

<html>
<body>
<fieldset>
<legend>
The little boy </legend>
A very strange, enchanted boy They say he wandered very far Very far, over land and sea A little shy and sad of eye But very wise was he </fieldset>
</body>
</html>


Preview:

The little boyThere was a boy A very strange, enchanted boy They say he wandered very far Very far, over land and sea A little shy and sad of eye But very wise was he


Next week: How to use an Image as a hyperlink




Home | FeedBack | Contact Us | Sitemap | Link Exchange
Copyright © 2007 Bztalkonline. All rights reserved.