Thuộc tính này dùng để chỉ định dấu ngoặc kép cho các đoạn trích dẫn.
Syntax:
quotes: none|auto|string;
Default Value: auto
Property values:
- none: Đây là giá trị mặc định. Nó sẽ không tạo ra bất kỳ dấu ngoặc kép nào.
- string: Thuộc tính này dùng để xác định loại dấu ngoặc kép cần dùng. Hai giá trị đầu chỉ cấp độ ngoặc kép thứ nhất. Hai giá trị sau chỉ cấp độ ngoặc kép thứ hai.
Example: Trong ví dụ này, ta sử dụng thuộc tính quotes: none;
.
<!DOCTYPE html>
<html>
<head>
<title>
CSS | quotes Property
</title>
<style>
#geeks {
quotes: none;
}
</style>
</head>
<body>
<center>
<h1 style="color:green;">GeeksForGeeks</h1>
<h2 style="color:green;">quotes:none;</h2>
<p><q id="geeks">geeksforgeeks.</q></p>
</center>
</body>
</html>
Output:
Example: Trong ví dụ này, ta dùng thuộc tính quotes: string;
.
<!DOCTYPE html>
<html>
<head>
<title>
CSS | quotes Property
</title>
<style>
#geeks {
quotes: '‹' '›';
}
#gfg {
quotes: '«' '»';
}
#sudo {
quotes: '‹' '›' '«' '»';
}
#g {
quotes: '‘' '’';
}
#f {
quotes: '”' '„';
}
#for {
quotes: '\2039' '\203A';
}
#data {
quotes: '\'' 00AB'
'\00BB';
}
#q {
quotes: '\2039' '\203A'
'\00AB'
'\00BB';
}
#google {
quotes: '\2018' '\2019';
}
#mark {
quotes: '\201D' '\201E';
}
h4 {
color: green;
}
</style>
</head>
<body>
<center>
<h1 style="color:green;">GeeksForGeeks</h1>
<h2 style="color:green;">quotes:string;</h2>
<h4>
<p><q id="geeks">geeksforgeeks.</q></p>
<p><q id="gfg">geeksforgeeks.</q></p>
<p><q id="sudo">geeksforgeeks.</q></p>
<p><q id="q">geeksforgeeks.</q></p>
<p><q id="f">geeksforgeeks.</q></p>
<p><q id="for">geeksforgeeks.</q></p>
<p><q id="data">geeksforgeeks.</q></p>
<p><q id="google">geeksforgeeks.</q></p>
<p><q id="mark">geeksforgeeks.</q></p>
</h4>
</center>
</body>
</html>
Output:
Supported Browsers: Các trình duyệt hỗ trợ quotes Property được liệt kê dưới đây:
- Google Chrome 11.0
- Edge 12.0
- Internet Explorer 8.0
- Firefox 1.5
- Opera 4.0
- Safari 9.0