Search w3schools.com:

SHARE THIS PAGE

Style quotes Property

Style Object Reference Style Object

Definition and Usage

The quotes property sets or returns the type of quotation marks for embedded quotations.

Syntax

Set the quotes property:

Object.style.quotes="none|string string string string|inherit"

Return the quotes property:

Object.style.quotes

Value Description
none Specifies that the open-quote and close-quote values will not produce any quotation marks. This is default
string string string string Specifies which quotation marks to use. The first two values specifies the first level of quotation embedding, the next two values specifies the next level of quote embedding, etc
inherit The value of the quotes property is inherited from parent element


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The quotes property is supported in all major browsers, except Internet Explorer and Safari.


Example

Example

Change quotation marks:

<html>
<head>
<script>
function displayResult()
{
document.getElementById("q1").style.quotes="'<' '>' '[start]' '[end]'";
}
</script>
</head>
<body>

<q id="q1">This is a <q>quoted element</q> in another quoted element.</q>
<br>

<button type="button" onclick="displayResult()">Change quotation marks</button>

</body>
</html>

Try it yourself »


Style Object Reference Style Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]