CodeBlessU
learn code with examples

Bootstrap Forms

Example links are referring to Bootstrap official site.

Bootstrap 5 Forms

  • Bootstrap 5 Forms works on top of Bootstrap reboot style.

Bootstrap 5 Text in the Form

This example shows usage of bootstrap class for text specified within HTML Form. If you have some help or error messages within form, bootstrap class="form-text" provides style for it.

  • Use class="form-text" for block level or inline text within Form. Example (on Bootstrap site), Example (on codepen.io)
  • Note: This is not required for the form components - i.e. input tag (as they will be rendered using other bootstrap classes), rather this is required for additional text (if present) in form, example, help message or error message on screen.
<form>
  <div class="form-text">
    Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji.
  </div>
</form>

In this page...

Copyright © All rights reserved.