Tutorialspoint examples

Learn java tutorial with examples for beginners online

Bootstrap Card Titles, Text and Links Tutorial


Bootstrap 4 card represents a bordered box with some padding around its content. It includes options for headers, footers, content, colors, etc. Bootstrap provides the following classes to create bootstrap card.
.card: class is used to create a bootstrap card.
.card-body: class is used to add content inside the card.
.card-header: class is used to add a heading to the card.
.card-footer: class is used to add a footer to the card.

Bootstrap provides the following classes to add titles, text and links.
.card-title: class is used to add card titles to any heading element.
.card-text: class is used to remove bottom margins for a p element if it is the last child in the card-block.
.card-link: class is used to add a blue color and a hover effect to any link.

Bootstrap 4 Card Titles, Text and Links Example:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap 4 Card titles, text and links Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</head>
<body>
 
<div class="container">
  <h2>Bootstrap 4 Card titles, text and links Example</h2>
  <div class="card">
    <div class="card-body">
      <h4 class="card-title">Card title</h4>
      <p class="card-text">Test Bootstrap Cards.</p>
      <a href="#" class="card-link">Card link</a>
      <a href="#" class="card-link">Another link</a>
    </div>
  </div>
</div>
 
</body>
</html>

Try it:

Bootstrap 4 Card titles, text and links Example on jsbin.com

Copyright © 2018 Tutorialspoint examples DMCA.com Protection Status