I'm fairly certain you can't change the shape. However, you can change a lot of other aspects to it.
Here is an example css style:
Now, some explaining. background-color, pretty self-explanatory. Border is what will be the color of the border. Height and width are self explanatory as well, and can be done in pixels (fixed size), or in percents.
You need the id tag, which will reference it to the style. Legend is what gives it the text between the lines.
Most of what you're talking about can be done through CSS. Set up an external (or in the
section) CSS statement, with
fieldset { [any of what I'm about to describe] }
By changing the rectangle shape, I'm not sure, what you mean, aside from changing the margins to change its size...
margin: 10em;
or
margin-top: 5em; margin-left: 10em; margin-right: 7em; margin-bottom: 3em;
or
margin: 5em 7em 3em 10em; /* which is the same thing ... */
You could give it borders and background...
border: 1px outset #999; background-color: #f00;
and/or a background image
background-image: url('landscape.jpg'); background-position: center center; background-attachment: fixed;
The boxes at top are legends. For example:
legend { padding: .5em 1em; border: 1px solid #000; background-color: #0f0; }
With some finagling you could get elaborate and change *some* of the shape of the fieldset by giving it rounded corners: you'd do this by giving it a set of background-images consisting of a floating gif with rounded images top+bottom left and an inside div containing a floated-right background-image of top+bottom-right rounded corners...very elaborate and time-consuming work...