Home > Article > Web Front-end > How to use css quotes attribute
css quotes attribute is used to set the quote type of nested quotes. All major browsers support the quotes attribute, but IE8 needs to define !DOCTYPE to support the quotes attribute.
How to use the css quotes attribute?
quotes attribute sets the quote type of nested quotation.
Attribute values that can be set:
● none: Specifies that the values of "open-quote" and "close-quote" of the "content" attribute will not produce any quotation marks.
● String string string string: Define the quotation marks to be used. The first two values specify the first level of quote nesting, and the last two values specify the next level of quote nesting.
● inherit specifies that the value of the quotes attribute should be inherited from the parent element.
Quotation mark characters
Note: All browsers support the quotes attribute.
Note: Internet Explorer 8 (and later) supports the quotes attribute if !DOCTYPE is specified.
css quotes attribute example
<!DOCTYPE> <html> <head> <meta charset="utf-8"> <style type="text/css"> q:lang(en) { quotes: '"' '"' "'" "'" } </style> </head> <body> <p><q>This is a <q>big</q> quote.</q></p> <p><b>注释:</b>如果已规定 !DOCTYPE,那么 Internet Explorer 8 (以及更高版本)支持 quotes 属性。</p> </body> </html>
Rendering:
The above is the detailed content of How to use css quotes attribute. For more information, please follow other related articles on the PHP Chinese website!