Last active
August 31, 2022 15:13
-
-
Save iKunalmathur/2aee6491fd029b1ccd28c540d3663ea4 to your computer and use it in GitHub Desktop.
Assignment 1 : create a simple webpage with cards arranged in horizontal fashion with image, text and a button.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>HTML & CSS Essentials</title> | |
<style> | |
.container { | |
padding: 1rem; | |
background-color: #eee; | |
} | |
.card { | |
border: 1px solid #333; | |
padding: 1rem; | |
margin: 0.8rem; | |
display: inline-block; | |
max-width: 400px; | |
background-color: #fff; | |
} | |
.card>img { | |
width: 100%; | |
height: 220px; | |
} | |
</style> | |
</head> | |
<!-- Assignment 1 : create a simple webpage with cards arranged in horizontal fashion with image, text and a button. --> | |
<body> | |
<div class="container"> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Card Title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<button> | |
Read more | |
</button> | |
</div> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Card Title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<button> | |
Read more | |
</button> | |
</div> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Card Title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<button> | |
Read more | |
</button> | |
</div> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Card Title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<button> | |
Read more | |
</button> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
adding buttons