HTML/CSS/Text/dt — различия между версиями

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

Текущая версия на 08:17, 26 мая 2010

Bold font for DT

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" />
  <style type="text/css" media="screen">
  #divID dt {
    font-weight: bold;
    }
  
  </style>
</head>
<body>

<div id="divID">
<dl>
  <dt>CSS</dt>
  <dd>A simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.</dd>
  <dt>XHTML</dt>
  <dd>A family of current and future document types and modules that reproduce, subset, and extend HTML, reformulated in XML.</dd>
  <dt>XML</dt>
  <dd>A simple, very flexible text format derived from SGML.</dd>
</dl>
</div>

</body>
</html>



font, color, background for dt

 
<!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">
.bios dt {
 font-weight: bold;
}
.bios dd {
 margin: 0;
 padding: 0;
}
.bios dl:target {
 background-color: #999999;
 border: 1px solid black;
 padding: 1em;
 font-weight: bold;
 line-height: 1.5;
}
.bios dl:target dt {
 font-style: italic;
 color: white;
 font-size: 1.5em;
 background-color: #cccccc;
 margin-right: 20px;
}
.bios dl:target dd {
 margin-right: 20px;
 background-color: #cccccc;
 padding: 0 1em 1em 1em;
}
.bios dl:not(:target) {
 border: none;
 padding: 0;
 font-size: .8em;
}
</style>
</head>
<body>
  <div class="bios">
   <dl>
    <dt>A</dt>
    <dd>This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. </dd>
   </dl>
   <dl id="jessica">
    <dt>B</dt>
    <dd>This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. </dd>
   </dl>
   <dl id="trueman">
    <dt>C</dt>
    <dd>This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. </dd></dl>
   <dl id="mark">
    <dt>D</dt>
    <dd>This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. 
    This is a text. This is a text. This is a text. This is a text. </dd></dl>
  </div>
  
</body>
</html>