HRef Attribute

HTML (DHTML)

HRef Attribute

Internet Development Index

Defines a URL for a shape. When the shape is clicked, the browser will load the URL. Read/write String.

Applies To

Shape

Tag Syntax

<v:element href="expression">

Script Syntax

element.href="expression"

expression=element.href

Remarks

The HRef attribute is similar to the standard HTML HRef attribute of anchors.

Using HRef makes it easy to create interesting buttons on a Web page.

VML Standard Attribute

Example

When the rectangle is clicked, the browser will load the Microsoft Corporation home page.

   <v:rect id=myrect fillcolor="red"
   href="http://www.microsoft.com"
   style="position:relative;top:1;left:1;width:20;height:20">
   </v:rect>
   

HRef Attribute Example. (Requires Microsoft Internet Explorer 5 or greater.)