Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

What is Image Thumbnail in Bootstrap 4 ?

  • Difficulty Level : Medium
  • Last Updated : 21 Oct, 2021

Image in Bootstrap 4 is displayed using <img> tag. In Bootstrap, Thumbnail is a border which is around the image. It is created using the .img-thumbnail class.

Syntax:

<img src="..." alt="...">

Image Thumbnails: In Bootstrap 4, the image thumbnail is a border surrounded by the image. To create this image thumbnail you can use the .img-thumbnail class.

Syntax:

<img src="..." alt="..." class="img-thumbnail">

Example:

HTML




<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1">
    <link rel="stylesheet" 
          href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
  
<body style="background-color:black">
    <center>
        <h1 style="color:green;">
          GeeksforGeeks
        </h1>
        <div class="container">
            <h2 style="color:white">
              Thumbnail
            </h2
          <img src=
               class="img-thumbnail" 
               alt="GFG" 
               width="200" 
               height="200"
      </div>
    </center>
</body>
  
</html>


Output:               




My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!