viernes, 30 de marzo de 2018

How To Create a Thumbnail Image

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
img {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    width: 150px;
}

img:hover {
    box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5);
}
</style>
</head>
<body>

<a target="_blank" href="img_beach.jpg">
  <img src="img_beach.jpg" alt="Forest" style="width:150px">
</a>

</body>
</html>

How TO - Center Images with HTML and CSS

<html>
<head>

<style>
img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
</style>
</head>
<body>

<img alt="city" src="http://www.traveller.com.au/cossies-beach-wa-brad-farmers-best-beach-in-australia-in-2017-gt354u" style="width: 50%;" />

</body>
</html>