You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > XvInterpretAs

XvInterpretAs style property

Browser support:
Specifies or retrieves how to interpret the contents of the corresponding element.
Same as the interpret-as property in the CSS3 declaration.


You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -xv-interpret-as

Possible values:

The type of this property is string.
 One of the following values: 
Element's content is an address.
Element's content is a currency value.
Takes the value of this property from the computed style of the parent element.
Element's content is a measurement.
Element's content is a proper name of a person, company etc.
Element's content is a URI such as an email address or an http URI.
Element's content is a telephone number.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the -xv-interpret-as property:
        .name {
            -xv-interpret-as: name;
        .telephone {
            -xv-interpret-as: telephone;
        .net {
            -xv-interpret-as: net;
    <p class="name">Oscar de la Hoya</p>
    <p class="telephone">(212) 907-8686</p>
    <p class="net"></p>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the XvInterpretAs property in JavaScript:
        #example {
            -xv-interpret-as: address;
    <script type="text/javascript">
        function ChangeIntpr (selectTag) {
            var example = document.getElementById ("example");

            // Returns the index of the selected option
            var whichSelected = selectTag.selectedIndex;

            // Returns the text of the selected option
            var selectState = selectTag.options[whichSelected].text;

            if ('XvInterpretAs' in {
       = selectState;
            } else {
                alert ("Your browser doesn't support this example!");
    <p id="example">615 Dottoro Ave, Webville, AR</p>

    Select the text above, right click and select speak, or change interpret mode:
    <select onchange="ChangeIntpr (this);" size="6">
        <option selected="selected">address</option>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content