freeCodeCamp/guide/english/certifications/responsive-web-design/basic-css/size-your-images/index.md

333 B

title
Size Your Images

Size Your Images

For sizing your images, first create your class in your style tag.

An example:

<style>
  .fixed-image {
    width: 500px;
    height: auto;
  }

You can then add the class to your image:

<img class="fixed-image" src="http://www.example.com/picture"/>