HTML/CSS/Style Basics/em
Содержание
Change em font
<!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><p><em class="leadingWords">this is a test. </em> this is a test. </p>
</body>
</html>
E in LI
<?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>
<h1>Shopping list for <em>Monday</em>:</h1>
<ul>
<li>M</li>
<li>B
<ul>
<li>W</li>
<li>R</li>
<li>W</li>
</ul>
</li>
<li>R</li>
<li>P</li>
<li>P<em>this is a test. </em></li>
</ul>
<p><a class = "nodec" href = "http://www.wbex.ru">
this is a test. </a></p>
</body>
</html>
Emphasis 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>Emphasis</title>
</head>
<body>
<p>Not only <em>should</em> a pizza be round,
but a proper pizza <strong>must</strong> be round.
<strong><em>real pizzas are round</em></strong>. Except when they"re not.</p>
</body>
</html>
Set em in a form to have underline text decoration and normal font style
<!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">T<em>i</em>tle</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"><em>N</em>ame</label>
<input type="text" name="fmname" id="fmname" />
<label for="fmemail" accesskey="e"><em>E</em>mail</label>
<input type="text" name="fmemail" id="fmemail" />
<label for="fmstate" accesskey="a">St<em>a</em>te/Province</label>
<input type="text" name="fmstate" id="fmstate" />
<label for="fmcountry" accesskey="y">Countr<em>y</em></label>
<input type="text" name="fmcountry" id="fmcountry" />
<label for="fmmsg" accesskey="m"><em>M</em>essage</label>
<textarea name="fmmsg" id="fmmsg" rows="5" cols="14"></textarea>
<input type="submit" name="submit" value="send" class="submit" />
</form>
</body>
</html>
Stylizing your text with EM and STRONG
<HTML>
<HEAD>
<TITLE> - Welcome</TITLE>
</HEAD>
<BODY>
<U>Welcome to Our Web Site!</U>
<EM>HTML</EM>
<STRONG> 2.0</STRONG>
</BODY>
</HTML>