Presentation is loading. Please wait.

Presentation is loading. Please wait.

Adding Images. XHTML Element ElementAttributeAttribute Value Closing tag AttributeAttribute Value The src attribute supplies the name and location of.

Similar presentations


Presentation on theme: "Adding Images. XHTML Element ElementAttributeAttribute Value Closing tag AttributeAttribute Value The src attribute supplies the name and location of."— Presentation transcript:

1 Adding Images

2 XHTML Element ElementAttributeAttribute Value Closing tag AttributeAttribute Value The src attribute supplies the name and location of the image file you wish to display. If no path is specified, the browser will expect the file to be in the same folder as the web page. The alt attribute determines what text will display in the web page if the image is not available. This is also what screen readers (for the visually impaired) will use. Get in the habit of naming image files in all lowercase letters and use underscores or dashes instead of spaces.

3 height and width attributes By specifying the height and width attributes of an image, we help the browser display the image correctly on the page. We can use these attributes to make a large image appear smaller on the page. We can also make a smaller image appear larger on the page, but this is not recommended, as the image will look pixelated and of poor quality. When making a large image appear smaller on the page, be sure to keep the same ratio of height to width. If you don't, the resulting image will look "squished" when it displays on the page.

4 Determining the Height and Width: By viewing the properties of an image file in Windows, you can see what the width and height are.

5 Resizing the Height and Width: By dividing the height and width evenly, we can resize an image on our web page.

6 Image Formats for the Web: The most common image formats for websites are (.jpg), (.png), and (.gif) extensions. While jpg files are used most often, the other two formats have their own advantages: Supports transparency: Supports animation: Color support: jpgpnggif Excellent Limited   Best suited for: Image Extension: PhotographsLogos, IconsAnimations


Download ppt "Adding Images. XHTML Element ElementAttributeAttribute Value Closing tag AttributeAttribute Value The src attribute supplies the name and location of."

Similar presentations


Ads by Google