How to Create Image Gallery in HTML

How to Create Image Gallery in HTML

In this article, you learn How to Create Image Gallery in HTML. Follow the Example.

Example:-

gallery.html

<html>
<head>
<title>Image Gallery</title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<div class="gallery">
  <a target="_blank" href="img_one.jpg">
    <img src="img_one.jpg" alt="img_one" width="500" height="300">
  </a>
  <div class="descr">Image One</div>
</div>

<div class="gallery">
  <a target="_blank" href="img_two.jpg">
    <img src="img_two.jpg" alt="img_two" width="500" height="300">
  </a>
  <div class="descr">Image Two</div>
</div>

<div class="gallery">
  <a target="_blank" href="img_three.jpg">
    <img src="img_three.jpg" alt="img_three" width="500" height="300">
  </a>
  <div class="descr">Image Three</div>
</div>

<div class="gallery">
  <a target="_blank" href="img_four.jpg">
    <img src="img_four.jpg" alt="img_four" width="500" height="300">
  </a>
  <div class="descr">Image Four</div>
</div>

</body>
</html>

You can read on Facebook

You May Also Like:- How to use Iframe in HTML

Leave A Reply