Using span to highlight one letter : span « Tags « HTML / CSS






Using span to highlight one letter

     
<!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">
body {
 margin: 25% 10% 0 10%;
}
h2 {
 font-size: 2em;
 font-weight: bold;
 font-family: Arial, Verdana, Helvetica, sans-serif;
 text-transform: uppercase;
 text-align: center;
 padding: 0;
 margin: 0;
}
h2 span {
 font-family: Times, "Times New Roman", Georgia, serif;
 font-size: 1.1em;
 font-weight: normal;
 }
h4 {
 margin: 0;
 padding: 0;
 font-size: 1.25em;
 font-weight: bold;
 font-family: Arial, Verdana, Helvetica, sans-serif;
 text-transform: uppercase;
 text-align: center;
}
h4 span {
 font-family: Times, "Times New Roman", Georgia, serif;
 font-size: 1.1em;
 font-weight: normal;
}
</style>
</head>

<h2>Cross<span>i</span>ng <span>Over</span></h2>
<h4>H(<span>I</span>-)<br />asdf<span>i</span>asdf<span>I</span>asdf</h4>
  
</body>
</html>

   
    
    
    
    
  








Related examples in the same category

1.'span' Example
2.span line-height: 0.6em;
3.span display: none;
4.span float: right;
5.span inside a h2
6.Empty span with background image
7.Using span to create author part of a quotation
8.Using span to highlight
9.Span inside a DIV
10.Span padding: 0 57px;
11.Span color: #786B50;
12.Span display: block;
13.Span float: left;
14.Span letter-spacing: 6px;
15.Span width: 1000px;
16.Span position: absolute;
17.Span top: 206px;
18.Span left: 86px;
19.Span color: #140A00
20.Let DIV span two columns
21.span with class selector
22.span padding: 0 10px;
23.span background: mistyrose;
24.span float left
25.span border: 1px solid rgb(200, 200, 200);
26.span background: rgb(244, 244, 244);
27.span background: white;
28.span border: 1px solid black;
29.Using span to create quotation
30.span.color {color:#FF0000;}
31.Capital first letter with span
32.Style a letter with span
33.Inline style for Span
34.The span element can be used to group inline elements only.
35.span with id style
36.Inline Spacer
37.Inline Decoration solid
38.Inline Decoration by border
39.Inline Decoration with image
40.span in a h2 with absolute position
41.SPAN in anchor
42.Span in a H2
43.Shrinkwrapped SPAN by setting both width and height to auto
44.Horizontally Stretched Absolute SPAN
45.Line break with margin top
46.Default line space with margin 0
47.One and half Line break with margin-top: 1.5em
48.Invisible inline horizontal rule: a line-break.
49.Double-border inline horizontal rule.
50.Background inline horizontal rule with image
51.Combination Inline horizontal rule.
52.Use SPAN to style Blocked area
53.Absolute centered