• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Description

Images have been a part of hypertext for quite some time. As the World Wide Web came into the public view in the early 1990s, there were already a few ways to store an image as a file. The most popular formats then (as now) were GIF and JPEG files. These types of images are not exactly the kind you can hand-code, like an HTML or XML document, and other modules of the two major browsers handle the rendering of these files. (X)HTML included a special tag, the <img /> tag, with an src attribute to tell the browser you wanted to view an image in the document.

You should not expect newer image formats, such as SVG (which you can hand-code, incidentally), to work with the <img /> element. Instead, the HTML 4 Recommendation includes the <object>...</object> element, covered in Chapter 31, “Programmable Elements.” The <embed> element is, however, the only way currently to embed an SVG image so it is viewable across browsers.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint