HTML code
Clean, semantic HTML that powers this Bootstrap 3.1.1 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.
Download<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
Scoped CSS that styles the component. Paste it after Bootstrap 3.1.1 to keep the design, spacing, and responsiveness consistent.
Downloadbody{
background:#eee;
}
#text {
resize: none;
margin-botton:10px;
}Javascript/Jquery code
Lightweight JS to power any interactions this snippet needs. Drop it under your scripts (after Bootstrap 3.1.1) to mirror the live demo.
Downloadvar 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');
}); FAQ
How do I use this snippet?
Include Bootstrap 3.1.1, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.
Can I use it in commercial projects?
Yes. It’s free for personal and commercial work; check the snippets license for details.
Is it responsive?
Yes. It inherits the responsive grid and components from Bootstrap 3.1.1.
About this bootstrap example/template
This free Bootstrap 3.1.1 snippet, Textarea with character count, was published on Jun 1st 2014, 19:45 by Bootdey Admin.
Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.
Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.
Already trusted in 11.8K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.
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