HTML and CSS Reference
In-Depth Information
2.8. Images Are Special
Image files are multimedia elements that you can reference with anchors
in your document for separate download and display by the browser.
But, unlike other multimedia, standard HTML and XHTML have an explicit
provision for image display "inline" with the text, and images can serve
as intricate maps of hyperlinks. That's because there is some consensus
in the industry concerning image file formatsspecifically, GIF, PNG, and
JPEGand the graphical browsers have built-in decoders that integrate
those image types into your document. [*]
[*] Some browsers support other multimedia besides GIF and JPEG graphics for inline display. Internet
Explorer, for instance, supports a tag that plays background audio. In addition, the HTML 4 and XHTML
standards provide a way to display other types of multimedia inline with document text through a general
tag.
2.8.1. Inline Images
The HTML/XHTML tag for inline images is <img> ; its required src attribute
is the image file that you want to display in the document. [ <img>,
5.2.6 ]
The browser separately loads images and places them into the text flow
as though the image were some special, albeit sometimes very large,
character. Normally, that means the browser aligns the bottom of the im-
age to the bottom of the current line of text. You can change that with
the special CSS align property, whose value you set to put the image at
the top , middle , or bottom of adjacent text. Examine Figures 2-2 through
2-4 for the image alignment you prefer. Of course, wide images may take
up the whole line and hence break the text flow. You can also place an
image by itself, by including preceding and following division, paragraph,
or line-break tags.
 
 
Search WWH ::




Custom Search