www.webdeveloper.com
Results 1 to 5 of 5

Thread: Need to write text with different color without using any html tag control

  1. #1
    Join Date
    Jun 2011
    Posts
    3

    Need to write text with different color without using any html tag control

    Need to write text with different color without using any html tag control like text area, label etc.

    please help me...

  2. #2
    Join Date
    Dec 2010
    Posts
    59
    Not really sure what you're asking. You change the style of elements using CSS.

  3. #3
    Join Date
    Jun 2011
    Posts
    3
    Quote Originally Posted by ralphchadkirk View Post
    Not really sure what you're asking. You change the style of elements using CSS.
    i need to write some text in my page with red color for that text and i don't want to use any html control for writing this text is it possible to set color to this text without using any html control.

  4. #4
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,456
    Hi there adriankawa,

    here you go, red text...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    
    <title>Red text</title>
    
    <style type="text/css">
    body {
        font-family:arial,sans-serif;
        font-size:1em;
        font-weight:bold;
        color:#f00;
     }
    </style>
    
    </head>
    <body>
    
    <p>
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras volutpat, purus ac 
    pellentesque adipiscing, mauris ligula convallis metus, vitae scelerisque nibh 
    orci quis mi. *** sociis natoque penatibus et magnis dis parturient montes, 
    nascetur ridiculus mus. Curabitur porttitor aliquam libero. Quisque molestie ornare 
    sem. Nam euismod sem lacinia ipsum. In pharetra metus ut dolor cursus aliquam. 
    Maecenas eu ante quis enim tincidunt laoreet. Pellentesque varius nunc in ipsum 
    pulvinar sollicitudin. Nunc et mi. Donec auctor dignissim orci. Aliquam sed magna. 
    Pellentesque in dui. In eget elit. Praesent eu lorem.
    </p>
    
    </body>
    </html>
    
    coothead

  5. #5
    Join Date
    Dec 2010
    Posts
    59
    Quote Originally Posted by adriankawa View Post
    i need to write some text in my page with red color for that text and i don't want to use any html control for writing this text is it possible to set color to this text without using any html control.
    Do you want all the text on the page to be red, or just some of it?

    To make it all red, use the code in the post above. To make some of it red, you'll need to replace the body {} in the example above with:
    Code:
    .red {
       color: #FF0000;
    }
    And use it with your paragraph tags as follows:
    HTML Code:
    <p class="red>
    ...
    </p>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles