W3Schools.com

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 type="text/javascript">
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
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE