Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

[HTML] Fieldset and Legend

I was reminded today of the <fieldset> and <legend> tags in HTML (BTW, they also work in XHTML). Basically, they are used to draw and label a box around input elements. Here's an example:

<form action="">
<div>
    <fieldset>
        <legend>Name Information</legend>
        <label for="firstName">First Name:</label>
        <input type="text" name="firstName" id="firstName" value="" /><br />
        <label for="lastName">Last Name:</label>
        <input type="text" name="lastName" id="lastName" value="" /><br />
    </fieldset>
    
    <fieldset>
        <legend>Address Information</legend>
        <label for="address">Address:</label>
        <input type="text" name="address" id="address" value="" /><br />
        <label for="city">City:</label>
        <input type="text" name="city" id="city" value="" /><br />
    </fieldset>
</div>
</form>

I added a little CSS for the fieldset and legend tags, and you end up with this:

Name Information

Address Information

Pretty cool eh? The labels end up in the text boxes (on some browsers) courtesy of the the label.js script.

Posted in The Web at Jan 31 2003, 11:47:45 AM MST 2 Comments
Comments:

Raible - Thanks for the tip. I used this on a project just now to spice up and organize the form. Burke

Posted by Brian Burke on January 31, 2003 at 08:30 PM MST #

if i use fieldset and legend tag with including struts tag, it is not working

Posted by zzz on November 02, 2011 at 04:15 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed