Boostrap Form Control Text Color

Ruth Jul 09, 2026

When it comes to designing responsive and visually appealing web forms, Bootstrap's form controls offer a wealth of customization options. One such customization is the ability to change the text color of form controls, enhancing user experience and aligning with your website's aesthetic. Let's delve into how you can achieve this.

HTML Form Validation with Bootstrap
HTML Form Validation with Bootstrap

Before we dive into the code, it's crucial to understand that Bootstrap uses the default text color specified in your CSS for form controls. However, you can easily override this to apply a custom color. Let's explore how to do this.

the bootstrap text colors list is shown in purple, orange and green tones
the bootstrap text colors list is shown in purple, orange and green tones

Changing Text Color in Bootstrap Form Controls

Bootstrap's form controls, such as inputs, selects, and textareas, use the .form-control class. To change the text color within these controls, you'll need to target this class and apply your desired color.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Here's a simple example of how you can change the text color to a shade of blue:

Using CSS

Bootstrap 4 cheat sheet
Bootstrap 4 cheat sheet

You can use plain CSS to change the text color. Add the following code to your stylesheet:

.form-control {
  color: #007bff; /* Replace with your desired color */
}

This will change the text color of all form controls to the specified color.

However, if you want to apply this style to a specific form control, you can use an ID or class selector:

Bootstrap Forms
Bootstrap Forms

#myInput {
  color: #007bff;
}

Using Bootstrap's Utility Classes

If you prefer using Bootstrap's utility classes, you can achieve the same result with less code. Bootstrap provides text color utility classes like .text-primary, .text-secondary, etc. You can apply these classes to your form control:

This will apply the primary text color to the input field. You can replace .text-primary with any other text color utility class.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Changing Text Color for Different States

Bootstrap's form controls have different states like focus, disabled, and invalid. You can also change the text color for these states.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
📝 Create Text Input Forms and Submit Button in HTML
📝 Create Text Input Forms and Submit Button in HTML
A Beginner's Guide to the Latest Bootstrap 5 Utilities
A Beginner's Guide to the Latest Bootstrap 5 Utilities
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Customize Form Controls with CSS Accent Color 🎨
Customize Form Controls with CSS Accent Color 🎨
Bootstrap Responsive Design Registration Form
Bootstrap Responsive Design Registration Form
C++ How to Program: A Complete Guide for Beginners
C++ How to Program: A Complete Guide for Beginners
BOOTSTRAP INPUT FORM (2020) | HOW TO MAKE FORM IN BOOTSTRAP
BOOTSTRAP INPUT FORM (2020) | HOW TO MAKE FORM IN BOOTSTRAP
55 Best Free Bootstrap Registration Form Designs 2026 - Colorlib
55 Best Free Bootstrap Registration Form Designs 2026 - Colorlib
Bootstrap 5.3 (2025) Cheat Sheet
Bootstrap 5.3 (2025) Cheat Sheet
📝 Create Forms in HTML
📝 Create Forms in HTML
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
the bootstap login and register forms page
the bootstap login and register forms page
an iphone screen with the text form and some subtile here highlighted on it
an iphone screen with the text form and some subtile here highlighted on it
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
CSS Input Text Code to Use in Your Own Forms
CSS Input Text Code to Use in Your Own Forms
Free themes for Bootstrap
Free themes for Bootstrap
Call-to-Action Colors: 18 Top CTA Button Examples + Color Guide
Call-to-Action Colors: 18 Top CTA Button Examples + Color Guide

To change the text color for the focus state, you can use the :focus pseudo-class:

.form-control:focus {
  color: #dc3545; /* Replace with your desired color */
}

For disabled and invalid states, you can use the .form-control-disabled and .is-invalid classes respectively:

.form-control-disabled {
  color: #6c757d; /* Replace with your desired color */
}

.is-invalid .form-control {
  color: #dc3545; /* Replace with your desired color */
}

Remember, these changes will only apply to the text within the form controls. The border and background colors will not be affected. If you want to change those as well, you'll need to target the .form-control class along with other Bootstrap classes or custom CSS.

In conclusion, changing the text color of Bootstrap form controls is a straightforward process that can significantly enhance the user experience and aesthetic appeal of your web forms. By utilizing CSS or Bootstrap's utility classes, you can easily apply custom colors to your form controls, making your forms more engaging and user-friendly.