URI related attributes are used to define a link between a current element and the destination element or a reference. In other words it contains an URI (URL) of the referred location.
Related elements:
href attribute:
src attribute:
IMG, INPUT, FRAME, IFRAME, SCRIPT
longdesc attribute:
usemap attribute:
target attribute:
nohref attribute:
cite attribute:
BLOCKQUOTE, Q, DEL, INS
Attribute characteristics and purpose:
href attribute:
- <a>, <area />, <link /> - specifies the link (path) between source (current) anchor and the destination anchor
- <base /> - specifies an absolute URI that is actually a base URI placed in the document's head and later used to address relative URIs inside the document itself;
src attribute:
- <img />, <input /> - specifies the resource location of the image file, such as .jpg, .gif, .png etc; in case of using it with the input element, the element must have type attribute set as "image"
- <frame>, <iframe> - specifies the location of the initial contents or page in the frame; that content can be changed with certain applied actions such as user's interaction
- <script> - specifies the location of an external script (such as javascript); can be applied in the head or the body of a web page
longdesc attribute:
- specifies a link to a long description of an image, frame or an image associated with an image map; it is used as a supplement to the alt or title attributes
usemap attribute:
- associates an image map with an element (<img />, <object> or <input />) and, because an image map is defined by a map element, it must match the value of the name attribute of the associated map element
- when used with an <object> or <input /> element it means that the element is an image (<object> or a type="image" (<input />)
target attribute:
- defines the name of a frame or a page where the linked document should be opened
- there are four reserved names for the target attribute: _blank (document should be loaded in a new, unnamed window), _self (document should be loaded in the same frame or window as the element that refers it), _parent (document should be loaded in the immediate frameset parent of the current frame, if the current frame has no parent it is equal to _self), _top (document should be loaded into the original window and cancel all other frames, if the current frame has no parent it is equal to _self)
- target attribute used inside an <a> element can refer to a particular frame if it matches the frame's name attribute's value
- it should be used in loose DTD except if used with frames, then it should be set to frameset DTD
nohref attribute:
- a Boolean attribute that specifies that a region has no link to be associated with
cite attribute:
- specifies a URI to a source of the message or quote
- <blockquote>, <q> - gives information about the source from which the citation was taken
- <del>, <ins> - points to information about the reasons why a document has been modified
Example
HTML URI attributes:
Comments
No comments have been made yet.
Please login to leave a comment. Login now