Lessons
|
Images
Images are used in many ways to enhance the look of a web page and make it more interesting and colorful. Images can be used to add background color, to help organize a Web page, to help clarify a point being made in the text, or to serve as links to other Web pages. Images also are often used to break up Web page sections (such as with a horizontal rule) or as directional elements that allow a visitor to navigate a Web site.
Types of Images
Web pages generally use three types of files as images: GIF, JPEG, and PNG.
Image HTML
Images are defined with the <img> tag. The browser displays the image where the <img> tag occurs in the document. If you put an image tag between two paragraphs, the browser shows the first paragraph, then the image, and then the second paragraph.
Image Attributes
The <img> tag is empty, which means that it contains attributes only, and has no closing tag. To display an image on a page, you need to use the src attribute.
|