Switch to full style
HTML code examples
Post a reply

change background of the paragraph

Thu Feb 23, 2012 12:01 am

Using CSS attributes to change the background color of the P tag in addition to the border color and the paragraph width.

Code:

    
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
    <head>
        <title>Change the background of the paragraph tag</title>
        <style type='text/css'>
            body {
                font: 1em sans-serif;
            }
            p {
                background: rgb(114, 114, 113);
                border: 2px solid red;
                width: 200px;
                padding: 15px;
                color: #FFBBBB;
            }
         
        
</style>
    </head>
    <body>
        <p>
        The paragraph width, background and the border is changed.
        </p>
    </body>
</
html>
 




Post a reply
  Related Posts  to : change background of the paragraph
 Change the text indent in the paragraph     -  
 Change the word spacing in paragraph     -  
 Change the margin and padding of paragraph     -  
 change background color with RGB     -  
 Change background position when mouse over     -  
 Change the body tag background in html     -  
 Automatic change to webpage background image     -  
 id Selector with paragraph     -  
 hide paragraph using jquery     -  
 Changing the line height of the paragraph     -  

Topic Tags

HTML Paragraph