How can I control the width of a label tag?
Using CSS, of course...
label { display: block; width: 100px; }
The width
attribute is deprecated, and CSS should always be used to control these kinds of presentational styles.
Using the inline-block is better because it doesn't force the remaining elements and/or controls to be drawn in a new line.
label {
width:200px;
display: inline-block;
}