To place an image on a page, use the
<img> tag. The
<img> tag has no closing tag.
We can specify the image from a source on another server using an absolute link, or from our own using a relative link.
<img src="http://www.w3.org/html/logo/downloads/HTML5_Logo_512.png" alt="HTML 5 Logo" width="200px">
<img src="/code/img/main-logo.svg" alt="Code Snippets Academy logo">
There are several image formats, each with their advantages and disadvantages. It's important to understand the filesize and its quality, as a super-high resolution may take a lot longer to load on the page. If your users are impatient, they may navigate elsewhere!
JPEG is a lossy compression format that compresses the original image. The upside to JPEGs are a smaller file size, but the drawback is that the image becomes not as clear.
GIFs contain no more than 256 colors, thus lowering the file size. We can have some pixels in the GIF to be transparent.
With a PNG, we can have 16 million colors, as well as alpha transparency. Very high resolution, so high file size.
Scalable Vector Graphics (SVG) is an XML-based vector image format for 2d graphics. The great thing about these is no matter how large or small it gets, the image does not blur or lose quality.
Stretch out your back and relieve your back muscles with inversion therapy. This device counteracts the forces of gravity on the body by decompressing and elongating the spine. By using this product just ten minutes a day, you can be well on your way to improved circulation and posture while relieving muscle aches, back pain and stress.$$ Check price
Want your web site to display more quickly? This book presents 14 specific rules that will cut 25% to 50% off response time when users request a page. Author Steve Souders, in his job as Chief Performance Yahoo!, collected these best practices while optimizing some of the most-visited pages on the Web.$ Check price