How-to articles, tricks, and solutions about LABEL

How to Align a Checkbox and Its Label Consistently Cross-Browsers

Checkbox is one of HTML forms that is used on every website. This tutorial will show how to align checkboxes and their labels consistently across browsers.

How to Align Labels Next to Inputs

In this snippet, you’ll learn how to align <label> elements next to <input> elements. Align labels to the right and left of inputs by using CSS properties.

How to Control the Width of the <label> Tag

Since the <label> tag is an inline element, using the width property won’t have any effect. Here you can find some methods of adding width to the <label> tag.

How to Create Checkbox with a Clickable Label

It is possible to create a checkbox with a clickable label. In this snippet, you can see how to create a checkbox with a clickable label with two methods.

How to Customize File Inputs

It is possible to customize the file input using a <label>. In this snippet, you’ll find the way of customizing the file input without using any JavaScript.

How to Style the Selected Label of a Radio Button

In this snippet, learn how you can style the selected label of a radio button. For that, you need to use the CSS :checked pseudo-class and some properties.