Bootstrap snippet and html example. Textarea with character count

This html snippet was created to help web designers, web developers, front-end and back-end developer save time. Use it for free in your project and build your app faster, You can also download the HTML, CSS, and JS code.
Tags: count,validation,form

HTML code

This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 3.1.1 included, to get the result that you can see in the preview selection

<div class="container">
<div class="col-md-7">
<div class="well">
    <form accept-charset="UTF-8" action="" method="POST">
        <textarea class="form-control" id="text" name="text" placeholder="Type in your message" rows="5"></textarea>
        <h6 class="pull-right" id="count_message"></h6>
        <button class="btn btn-info" type="submit">Post New Message</button>
    </form>
</div>
</div>
</div>

CSS code

This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 3.1.1 included, to get the result that you can see in the preview selection

body{
background:#eee;
}
#text {
    resize: none;
    margin-botton:10px;
}

Javascript/Jquery code

This is the javascript code used to create this bootstrap snippet, You can copy and paste the following javascript code inside a page with bootstrap 3.1.1 included, to get the result that you can see in the preview selection

var text_max = 200;
$('#count_message').html(text_max + ' remaining');
  $('#text').keyup(function() {
  var text_length = $('#text').val().length;
  var text_remaining = text_max - text_length;
  $('#count_message').html(text_remaining + ' remaining');
}); 

Similar snippets

Bootstrap example and template. blue sign up

blue sign up

Bootstrap example and template. Dark Login

Dark Login

Bootstrap example and template. Highlight textbox instead of error message using jquery validations

Highlight textbox instead of error message using jquery validations

Bootstrap example and template. bs4 beta login

bs4 beta login

Bootstrap example and template. bs5 dark footer

bs5 dark footer

Bootstrap example and template. company invoice

company invoice

Bootstrap example and template. white chat

white chat

Bootstrap example and template. bs4 card widget

bs4 card widget

Bootstrap example and template. Textarea with character count

About this bootstrap example/template

We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.

We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.

This code example currectly have 10.4K views, Using this bootstrap snippet you have the following benefits:

Bootstrap 3.1.1

<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css'>

<script src='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js'></script>

This code example is based on bootstrap 3.1.1 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

Jquery plugins

Great built-in plugins with jquery framework, you can easy to change all declarations

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working