IMG

 [Local Convention]

 [CoOL Conventions] CoOL Conventions

Either GIF or JPEG images may be used in CoOL documents. PNG images will be allowed this format is widely supported by browsers.

With the exception of images that are strictly decorative, all inline images shall have descriptive text included in the ALT attribute, to aid in machine renderings for the visually impaired

Whenever possible (and always with large images) the WIDTH and HEIGHT attributes should be included.

The IMG element allows an image to be inserted "inline" within an HTML document. The purpose is to allow pictures to be included within a document and presented with the text, as opposed to having hypertext links that retrieve and display images in a separate viewing window. The main distinction between an "inline" image and an image linked with the A element, is that IMG cause the graphic element to be inserted automatically, without any action on the part of the user.

This element can not be used to include other HTML text within a given document.

Images can be included within a hypertext anchor thus you can make an image icon behave as a button to access other documents.

Note that IMG may only occur with some other element, such as P or a Heading. Earlier versions of HTML allowed IMG anywhere in the body of the document, but this is now illegal. If you find yourself with a 'lone IMG', simply put it in a paragraph: <p><img src="blahblah" alt="blahblah"></p>

Example

<p>
<img src="/icons/sullogo2.gif" alt=" [Logo] ">
<p>

Note that IMG does not imply a line break either before or after. If you want adjacent text to be displayed on the line following (or preceding) the image, you must insert BR tags as needed. Markup like the following may cause wordwrap on narrow displays and not on wide displays

<p><img src="verywidepicture.gif">
Stanford University Libraries & Academic Information Resources

so if you are creating a 'logo' type image, and are especially concerned about the visual effect, you might consider inserting a BR element after the IMG tag or, use the ALIGN attribute.


Content


ATTRIBUTES
Empty CONTENT DECLARATION

Tag Minimization
Open Tag: REQUIRED
Close Tag: OPTIONAL

Parent Elements


Top Elements
All Elements
Tree


htmlx DTD