HTML/CSS/Text/blockquote

Материал из Web эксперт
Перейти к: навигация, поиск

blockquote tag

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Block quotation</title>
</head>
<body>
  
  <h2>Reviews</h2>
  <p>Even those stuffy restaurant critics can"t resist our charms.</p>
  <blockquote cite="http://e.ru">
    <p>this is a text.</p>
  </blockquote>
</body>
</html>



border for blockquote

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title></title>
<style>
blockquote {
    border-left-style: dashed;
    border-left-width: 4px;
    border-left-color: #ffcc00;
    padding: 20px;
}

</style>
</head>
<body>
<h1>header 1</h1>
<p>Do you now?</p>
<p><blockquote>block quote.</blockquote></p>
<p>Did you now?</p>
</body>
</html>



Different background for blockquote and paragraph in a blockquote

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
blockquote {
 float: left;
 width: 175px;
 margin: 0 0.7em 0 0;
 padding: 10px 0 0 27px;
 font-size: 1.2em;
 font-style: italic;
 color: black;
}
blockquote p {
 margin: 0;
 padding: 0 22px 10px 0;
 width:150px;
 text-align: justify;
 line-height: 1.3em;
}
</style>
</head>
<body>
  <p>One</p>
  <blockquote>
    <p>Two</p>
  </blockquote>
  <p>three</p>
  <p>four</p>
  <p>file</p>
</body>
</html>



Set margin, padding and color for blockquote

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
blockquote {
 margin: 0;
 padding: 0;
 color: #555;
}
</style>
</head>
<body>
  <p>One</p>
  <blockquote>
    <p>Two</p>
    <div class="source">
      Three
    </div>
  </blockquote>
  <p>Four</p>
</body>
</html>



Style for blockquote and paragraph in a blockquote

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
blockquote {
 float: left;
 width: 200px;
 margin: 0 0.7em 0 0;
 padding: 0.7em;
 color: #666;
 background-color: black;
 font-size: 1.5em;
 font-style: italic;
 border-top: 1em solid #999;
 border-bottom: 1em solid #999;
}
blockquote p {
 margin: 0;
 padding: 0;
 text-align: left;
 line-height: 1.3em;
}
</style>
</head>
<body>
  <p>One</p>
  <blockquote>
    <p>Two</p>
  </blockquote>
  <p>three</p>
  <p>four</p>
  <p>file</p>
</body>
</html>