HTML Example: Image Responsive
x
<title>HTML Example: Image Responsive</title>
<style>
img {
display: block;
max-width: 100%;
height: auto;
}
</style>
<img src="/examples/files/18l.jpg" alt="3 little puddy dats!">
<hr>
<p>Responsive images will resize to the viewport size if they're too wide to fit.</p>
<p>Non-responsive images won't do this, and usually result in horizontal scrolling.</p>
In this example, the left side provides the code used to render the output in the right side.
Feel free to copy and paste the code into your own project and modify as you wish.
About HTML
HTML stands for HyperText Markup Language. It's the markup language that enables us to create web pages. Web pages typically consist of HTML, as well as various other technologies, such as CSS (Cascading Style Sheets - for adding styles to web pages), JavaScript (for adding functionality), and jQuery, to name a few.