src Attribute


 

Where to use the src Attribute


Description

On img elements, the src attribute is #REQUIRED and specifies the URI of the image to be displayed.

On input type="image" elements, the src attribute specifies the URI of the image to be used in the graphical submit button. Although src is not technically #REQUIRED here, it is pointless to have a graphical submit button without an image specified!

On script elements, the src attribute specifies the URI of an external script to be loaded.

Relative URIs in src attributes are resolved with respect to the current document's base URI (see the base element).


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Attribute Index (XHTML 1.1) > src Attribute (XHTML 1.1)