speak style property

Browser support:
Specifies or returns how the browser should speak the content.

Syntax:

object.speak;
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: speak

Possible values:

The type of this property is string.
 One of the following values: 
inherit
Takes the value of this property from the computed style of the parent element.
none
Uses language-dependent pronunciation rules for rendering an element and its children.
normal
Suppresses aural rendering so that the element requires no time to render.
spell-out
Spells the text one letter at a time.
Default: normal.

Example HTML code 1:

This example illustrates the use of the speak property:
<head>
    <style>
        .example {
            speak: spell-out
        }
    </style>
</head>
<body>
    <p class="example">WWW Select this text and use context menu</p>
</body>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the speak property in JavaScript:
<head>
    <script type="text/javascript">
        function ChangeSpeak (selectTag) {
            // Returns the index of the selected option
            var whichSelected = selectTag.selectedIndex;

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

            var anchor = document.getElementById ("myAnchor");
 
            if ('speak' in anchor.style) {
               anchor.style.speak = speakValue;
            } else {
                alert ("Your browser doesn't support this example!");
            }
        }
    </script>
</head>
<body>
    <a id="myAnchor">Select this text and use context menu</a>

    <select onchange="ChangeSpeak (this);" size="4">
        <option />inherit
        <option selected="selected" />normal
        <option />none
        <option />spell-out
    </select>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content