<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<h1 class="title-length">Once upon a time in the land of the Bengal tigers</h1>
<p class="body-length">Told over the span of 1000 years, HerStories explores the lives of 21 outstanding women of Bengal and present day Bangladesh. Educationalists, poets, athletes, artists and activists, the heroines of HerStories are home-grown role models for future generations.The project is a collaboration of over 30 university researchers, illustrators and writers, bringing to life tales of great ambition, daring and intelligence. Each of the HerStories characters is a catalyst of change, breaking new ground and laying the way for others.</p>
</div>
<div class="row">
<h1 class="title-length">Once upon a time in the land of the Bengal tigers</h1>
<p class="body-length">Told over the span of 1000 years, HerStories explores the lives of 21 outstanding women of Bengal and present day Bangladesh. Educationalists, poets, athletes, artists and activists, the heroines of HerStories are home-grown role models for future generations.The project is a collaboration of over 30 university researchers, illustrators and writers, bringing to life tales of great ambition, daring and intelligence. Each of the HerStories characters is a catalyst of change, breaking new ground and laying the way for others.</p>
</div>
<div class="row">
<h1 class="title-length">Once upon a time in the land of the Bengal tigers</h1>
<p class="body-length">Told over the span of 1000 years, HerStories explores the lives of 21 outstanding women of Bengal and present day Bangladesh. Educationalists, poets, athletes, artists and activists, the heroines of HerStories are home-grown role models for future generations.The project is a collaboration of over 30 university researchers, illustrators and writers, bringing to life tales of great ambition, daring and intelligence. Each of the HerStories characters is a catalyst of change, breaking new ground and laying the way for others.</p>
</div>
</div>
function titleLength() {
var x = document.getElementsByClassName("title-length");
var i;
for (i = 0; i < x.length; i++) {
var y = x[i].innerHTML.substr(0,20);
x[i].innerHTML = y;
}
}
function bodyeLength() {
var x = document.getElementsByClassName("body-length");
var i;
for (i = 0; i < x.length; i++) {
var y = x[i].innerHTML.substr(0,200);
x[i].innerHTML = y;
}
}
titleLength();
bodyeLength();