Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Basics Images, Text and Links Adding Images to the Page

Waqas Khan
PLUS
Waqas Khan
Courses Plus Student 2,661 Points

Why there are so many images format?

Why there are so many images format?

do I have to use all of these images format...

can we use GIF format?

3 Answers

Steven Parker
Steven Parker
229,732 Points

Some image formats are more effective for certain kinds of material. Others may offer features that are only needed occasionally. For example, the GIF format you mentioned will store animation sequences and transparent areas, where JPG will not. But JPG is much more efficient when storing content with lots of colors such as a photograph.

And yes, GIF is a common image format supported by all browsers.

As a Web developer, it is important to understand the differences between image formats. As Steven Parker already pointed out, different formats are used in different situations. The three most common image formats for the Web are JPG, GIF, and PNG.

As you improve your Web developer skills, you may want to take a little time and familiarize yourself with these formats. The University of Michigan has a nice introduction to images to get you started.

Thank you for the info and the link.

I tried to upvote your answer, but it goes to -1. I don't understand how this up down arrows work. I thought if clicking the up pointing arrow it means you like the answer. How come i clicked it, it goes negative 1 instead (-1). Anyways, I am upvoting your answer still. Thank you for the answer

Steven Parker
Steven Parker
229,732 Points

Voting box info:

Clicking the "up" chevron (arrow) over the vote box will raise the vote, and the down chevron will lower it.

If you up-voted before, the box will be green, and clicking "up" again will cancel your previous vote. If you down-voted before, the "down" chevron will be red and clicking it again will also cancel the vote. Clicking on the opposite chevron from a previous vote will both cancel the old vote and register the new one.

The person who asked the question also has the option of choosing a "best answer". This does not change the vote number, but gives the answer a green background. It also gives the question a green check-mark in the forum listing to let everyone know the issue has been solved. Only the original poster has this option.

Waqas Khan
PLUS
Waqas Khan
Courses Plus Student 2,661 Points

Thank you! One more Question?

do we need to adjust the pixel of the pictures every time?

Steven Parker
Steven Parker
229,732 Points

I'm not sure what you mean by "adjust the pixel". Can you elaborate a bit?

I think he means if he always has to re-size the images.