Drupal 7: How to add custom CSS class to Field Label or Field title

Default Drupal Fields

While it is easy to assign CSS classes to fields in general both field label and value when using Views and when using useful Drupal modules such as the Field Formatter Class module, it is sometimes tricky to insert your custom CSS class to the field label itself.

A quick workaround is to assign a custom CSS class using the field labels value + the field label name. For example to asssign a class to the label of the field - Company Website, you will need to add a class like below: 

Get reliable web hosting services

Recurring donation

Make Donation

  • Other: $

Donate now

Single donation

Make Donation

  • Other: $

Donate now