CSS statements for heading styles : hN « Tags « HTML / CSS






CSS statements for heading styles

   
<!DOCTYPE html> 
<html> 
<head> 
<title></title> 
<style type="text/css"> 
body { text-align: center; } 
h1 { font-family: sans-serif; } 
h2 { border: 2px solid black; padding: 10px; } 
h3 { font: bold italic 18pt Comic Sans MS; } 
h4 { color: white; background-color: darkgrey } 
h5 { visibility: hidden; } 
h6 { letter-spacing: 1.5em; } 
</style> 
</head> 
<body> 
<h1>Level 1 Heading</h1> 
<h2>Level 2 Heading</h2> 
<h3>Level 3 Heading</h3> 
<h4>Level 4 Heading</h4> 
<h5>Level 5 Heading</h5> 
<h6>Level 6 Heading</h6> 
</body> 
<html> 

   
    
    
  








Related examples in the same category

1.H1 inline style
2.H1 float: left;
3.H1 width: 680px;
4.H1 display: block;
5.h1 letter-spacing: 3px;
6.h1 letter-spacing: 5px;
7.h1 {counter-reset: paragraphNumber;}
8.h2 letter-spacing: 5px;
9.HTML heading elements
10.Header 1 alignment
11.Heading Test
12.Create a Heading
13.Letter spacing in headings