HTML/CSS/Style Basics/em

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

Change em font

   <source lang="html4strict">

<!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> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Leading words</title> <style type="text/css"> em.leadingWords {

  font-style: normal; 
  font-variant: small-caps; 

} </style> </head>

<body>

this is a test. this is a test.

</body> </html>

</source>
   
  


E in LI

   <source lang="html4strict">

<?xml version = "1.0"?> <!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>
     <style type = "text/css">
        li em    { color: red;
                   font-weight: bold }
     </style>
  </head>
  <body>

Shopping list for Monday:

  • M
  • B
    • W
    • R
    • W
  • R
  • P
  • Pthis is a test.

<a class = "nodec" href = "http://www.wbex.ru"> this is a test. </a>

  </body>

</html>

</source>
   
  


Emphasis tag

   <source lang="html4strict">

<!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>Emphasis</title>

</head> <body>

Not only should a pizza be round, but a proper pizza must be round. real pizzas are round. Except when they"re not.

</body> </html>

</source>
   
  


Set em in a form to have underline text decoration and normal font style

   <source lang="html4strict">

<!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"> form em {

text-decoration: underline;
font-style: normal;

} </style> </head> <body>

  <form id="msgform" name="msgform" method="post" action="/">
  <label for="fmtitle" accesskey="i">Title</label>
  <select name="fmtitle" id="fmtitle">
   <option value="ms">Ms.</option>
   <option value="mrs">Mrs.</option>
   <option value="miss">Miss</option>
   <option value="mr">Mr.</option>
  </select>
  <label for="fmname" accesskey="n">Name</label>
  <input type="text" name="fmname" id="fmname" />
  <label for="fmemail" accesskey="e">Email</label>
  <input type="text"  name="fmemail" id="fmemail" />
  <label for="fmstate" accesskey="a">State/Province</label> 
  <input type="text" name="fmstate" id="fmstate" />
  <label for="fmcountry" accesskey="y">Country</label>
  <input type="text" name="fmcountry" id="fmcountry" />
  <label for="fmmsg" accesskey="m">Message</label>
  <textarea name="fmmsg" id="fmmsg" rows="5" cols="14"></textarea>
  <input type="submit" name="submit" value="send" class="submit" />
 </form>

</body> </html>

</source>
   
  


Stylizing your text with EM and STRONG

   <source lang="html4strict">

<HTML> <HEAD> <TITLE> - Welcome</TITLE> </HEAD> <BODY> Welcome to Our Web Site! HTML 2.0 </BODY> </HTML>

</source>