Switch to full style
HTML code examples
Post a reply

Usage of the before CSS attribute

Thu Feb 23, 2012 7:34 pm

Using CSS before attribute along with paragraph tag, this attribute allows you to show a fixed message before your paragraph that is linked to the CSS class.


Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
title>Usage of the before CSS attribute </title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
style type='text/css'>
p.beforeGraph:before {
   
content"Fixed content appears here.";color:#f0c000;
   
}
</
style>


</
head>
<
body>
<
h1>Using before with paragraph</h1>
<
class="beforeGraph"><br/> The sentence above this paragraph 
appears using CSS before attribute
. </p>
 
</
body>
</
html>
 




Post a reply
  Related Posts  to : Usage of the before CSS attribute
 usage of ch attribute     -  
 usage of rev attribute     -  
 Usage of the after CSS attribute     -  
 vspace attribute usage     -  
 row-span attribute usage     -  
 colspan attribute usage     -  
 Usage of contenteditable attribute     -  
 usage of <br> tag clear attribute     -  
 usage of id attribute for link jumps     -  
 SWAP images using JQuery just by using the src attribute img     -  

Topic Tags

HTML Paragraph