Welcome to WebmasterServe!

FREE TO JOIN! Join us now to engage in informative and friendly discussions about Webmastering, SEO, SEM, Internet Marketing, Programming, Graphic Design, Online Jobs and more. What are you waiting for? Ready to join our friendly community? It takes just one minute to register.

Dismiss Notice

Join WebmasterServe Forums 
Join the discussion! Have a better idea or an opinion? It takes just one minute to register Click Here to Join

Tutorial How To Put Background Color In Text Using Html Coding

Discussion in 'Web Design and Graphics' started by Prasoon Arora, Feb 3, 2016.

  1. Prasoon Arora

    Yellow Belt

    Joined:
    Feb 1, 2016
    Messages:
    472
    Ratings:
    +24 / -0
    We always want to highlight text in our website, for some important information. To keep the text highlighted with the background color is one of the option.

    You do not need to be expert in html, neither you need to learn something. Just have a look on the below mentioned steps and you would be able to highlight your text with the background color.

    Syntax : <FONT style="BACKGROUND-COLOR: red"> Text</FONT>

    1. To put a particular text highlighted use the below mentioned coding :

    <HTML>
    <HEAD>
    </HEAD>
    <BODY>

    <P>My name

    <FONT style="BACKGROUND-COLOR: red"> "Prasoon"</FONT>

    would be highlighted in red background
    </P>

    </BODY>
    </HTML>

    See the result to be displayed :


    onlyname.PNG


    2. To put the complete sentence in background color use the coding as mentioned below :

    <HTML>
    <BODY>

    <P>

    <FONT style="BACKGROUND-COLOR: yellow"> This text including my name Prasoon would be in yellow color.</FONT>

    </P>

    </BODY>
    </HTML>

    See the result to be displayed :


    fulltext.PNG




    Note : Using <HEAD></HEAD> depends on you, need to be written as <head> tags denote the heading in the page.
     
    #1 Prasoon Arora, Feb 3, 2016 at 11:09 PM
    Last edited: Feb 3, 2016
  2. Zirkon Kalti

    Yellow Belt

    Joined:
    Dec 10, 2015
    Messages:
    981
    Ratings:
    +120 / -0
    If you need any help on HTML code, you simply search for it on Google for example background color + code and the search result will returns website that provide the tutorial and the sample code. One great site where you can find HTML and CSS codes is W3 Schools.
     
  3. SirJoe

    Yellow Belt

    Joined:
    Feb 1, 2016
    Messages:
    88
    Ratings:
    +6 / -0
    w3schools is a great place to remove any doubt that you might have, but I find that you have to have some knowledge in programming to use it. It does have some great info though.
     
  4. Pooja Sharma

    Yellow Belt

    Joined:
    Feb 5, 2016
    Messages:
    373
    Ratings:
    +20 / -0
    I always wish to find options to put background color to my text that needs to be highlighted in my website.I just referred to the above codings and find it simple to use as if there is no need to learn any specific language. W3S schools website is really a great place to learn any language from HTML, PHP to css. W3Sschool website have even provided the coding explanation and description chapter wise that would be helping a lot of people who really wish to put their efforts in building website using coding.
     
  5. coolyfrost

    Yellow Belt

    Joined:
    Jan 23, 2016
    Messages:
    135
    Ratings:
    +9 / -0
    Thanks for the guide OP! I am new to HTML so I'm still learning new things and that is definitely a cool trick to know. Does anyone else know about other HTML tricks that I can try out? Thanks!
     
  6. Pooja Sharma

    Yellow Belt

    Joined:
    Feb 5, 2016
    Messages:
    373
    Ratings:
    +20 / -0
    @Prasoon Arora@Prasoon Arora :
    Can you please let us know if there is a way that text can moved from up to doun or vice versa.As I have noticed in most of the website text goes from top to bottom or bottom to top to show their news feeds or current updates happening in the website. This type of animated text are really helpful to attract visitors and I wish to know how it can be done.
     
  7. Prasoon Arora

    Yellow Belt

    Joined:
    Feb 1, 2016
    Messages:
    472
    Ratings:
    +24 / -0
    I really appreciate your efforts made to learn html. Learning html do not require much troubleshooting steps. As html, is preferred more in compared to any of the stuffs. If you are stuck anywhere, you may search and can find the solution easily.

    Being a programmer, I respect newbies and help them always.

    @Pooja Sharma@Pooja Sharma :
    @coolyfrost@coolyfrost :

    You may refer to my thread related to move your text from top to bottom for another trick. Give it a try with your own skills, and I will make sure I can provide as much tricks that I am aware of.
     
  8. coolyfrost

    Yellow Belt

    Joined:
    Jan 23, 2016
    Messages:
    135
    Ratings:
    +9 / -0
    Alright, thanks! I'm trying to get into several programming languages at the moment and I think that HTML will be a good start since it supposedly is extremely simple to get into. Of course it will always take several years to master a programming language, but I'm confident that with enough time everything is possible :p .
     

Share This Page