How to use css to add multiple styles for a paragraph [closed]












-2














How to use css to add multiple styles for a paragraph



For Ex: in my below css code,



p {
text-align: justify
}
p {
font-size: xx-small
}

p {
color: aqua
}
body {
font-family: Arial, Helvetica, sans-serif
}
h1,h2,h3,h4,h5,h6 {
text-align: right,
}
li {
text-align: center
}


Now as you can see i have for Paragraph the following styles kept




  1. Justify

  2. Small

  3. Aqua Color


How can i combine all of them into the same tag rather than having it distributed in three sections



Thank you,










share|improve this question















closed as off-topic by Temani Afif, Michael Dodd, Madhur Bhaiya, Pearly Spencer, Machavity Nov 12 '18 at 15:11


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Temani Afif, Michael Dodd, Madhur Bhaiya, Pearly Spencer, Machavity

If this question can be reworded to fit the rules in the help center, please edit the question.













  • p{ text-align: justify; font-size: xx-small; color: aqua; }
    – Geetesh
    Nov 12 '18 at 13:05










  • You mean automtically? OR what the result should look like?
    – HerrSerker
    Nov 12 '18 at 13:06






  • 4




    Really, this not ment as an insult, but if this is the level of question you're asking about css, I recommend you do at least some research into CSS, as this is probally one of the first things you encounter.
    – Martijn
    Nov 12 '18 at 13:07
















-2














How to use css to add multiple styles for a paragraph



For Ex: in my below css code,



p {
text-align: justify
}
p {
font-size: xx-small
}

p {
color: aqua
}
body {
font-family: Arial, Helvetica, sans-serif
}
h1,h2,h3,h4,h5,h6 {
text-align: right,
}
li {
text-align: center
}


Now as you can see i have for Paragraph the following styles kept




  1. Justify

  2. Small

  3. Aqua Color


How can i combine all of them into the same tag rather than having it distributed in three sections



Thank you,










share|improve this question















closed as off-topic by Temani Afif, Michael Dodd, Madhur Bhaiya, Pearly Spencer, Machavity Nov 12 '18 at 15:11


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Temani Afif, Michael Dodd, Madhur Bhaiya, Pearly Spencer, Machavity

If this question can be reworded to fit the rules in the help center, please edit the question.













  • p{ text-align: justify; font-size: xx-small; color: aqua; }
    – Geetesh
    Nov 12 '18 at 13:05










  • You mean automtically? OR what the result should look like?
    – HerrSerker
    Nov 12 '18 at 13:06






  • 4




    Really, this not ment as an insult, but if this is the level of question you're asking about css, I recommend you do at least some research into CSS, as this is probally one of the first things you encounter.
    – Martijn
    Nov 12 '18 at 13:07














-2












-2








-2







How to use css to add multiple styles for a paragraph



For Ex: in my below css code,



p {
text-align: justify
}
p {
font-size: xx-small
}

p {
color: aqua
}
body {
font-family: Arial, Helvetica, sans-serif
}
h1,h2,h3,h4,h5,h6 {
text-align: right,
}
li {
text-align: center
}


Now as you can see i have for Paragraph the following styles kept




  1. Justify

  2. Small

  3. Aqua Color


How can i combine all of them into the same tag rather than having it distributed in three sections



Thank you,










share|improve this question















How to use css to add multiple styles for a paragraph



For Ex: in my below css code,



p {
text-align: justify
}
p {
font-size: xx-small
}

p {
color: aqua
}
body {
font-family: Arial, Helvetica, sans-serif
}
h1,h2,h3,h4,h5,h6 {
text-align: right,
}
li {
text-align: center
}


Now as you can see i have for Paragraph the following styles kept




  1. Justify

  2. Small

  3. Aqua Color


How can i combine all of them into the same tag rather than having it distributed in three sections



Thank you,







html css html5 css3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 '18 at 13:09









PaulH

2,1511821




2,1511821










asked Nov 12 '18 at 13:02









anish anilanish anil

71213




71213




closed as off-topic by Temani Afif, Michael Dodd, Madhur Bhaiya, Pearly Spencer, Machavity Nov 12 '18 at 15:11


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Temani Afif, Michael Dodd, Madhur Bhaiya, Pearly Spencer, Machavity

If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Temani Afif, Michael Dodd, Madhur Bhaiya, Pearly Spencer, Machavity Nov 12 '18 at 15:11


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Temani Afif, Michael Dodd, Madhur Bhaiya, Pearly Spencer, Machavity

If this question can be reworded to fit the rules in the help center, please edit the question.












  • p{ text-align: justify; font-size: xx-small; color: aqua; }
    – Geetesh
    Nov 12 '18 at 13:05










  • You mean automtically? OR what the result should look like?
    – HerrSerker
    Nov 12 '18 at 13:06






  • 4




    Really, this not ment as an insult, but if this is the level of question you're asking about css, I recommend you do at least some research into CSS, as this is probally one of the first things you encounter.
    – Martijn
    Nov 12 '18 at 13:07


















  • p{ text-align: justify; font-size: xx-small; color: aqua; }
    – Geetesh
    Nov 12 '18 at 13:05










  • You mean automtically? OR what the result should look like?
    – HerrSerker
    Nov 12 '18 at 13:06






  • 4




    Really, this not ment as an insult, but if this is the level of question you're asking about css, I recommend you do at least some research into CSS, as this is probally one of the first things you encounter.
    – Martijn
    Nov 12 '18 at 13:07
















p{ text-align: justify; font-size: xx-small; color: aqua; }
– Geetesh
Nov 12 '18 at 13:05




p{ text-align: justify; font-size: xx-small; color: aqua; }
– Geetesh
Nov 12 '18 at 13:05












You mean automtically? OR what the result should look like?
– HerrSerker
Nov 12 '18 at 13:06




You mean automtically? OR what the result should look like?
– HerrSerker
Nov 12 '18 at 13:06




4




4




Really, this not ment as an insult, but if this is the level of question you're asking about css, I recommend you do at least some research into CSS, as this is probally one of the first things you encounter.
– Martijn
Nov 12 '18 at 13:07




Really, this not ment as an insult, but if this is the level of question you're asking about css, I recommend you do at least some research into CSS, as this is probally one of the first things you encounter.
– Martijn
Nov 12 '18 at 13:07












4 Answers
4






active

oldest

votes


















1














It is the semicolon ; that is missing in your code. Normally a CSS rule ends with a semicolon. Only after the last rule before a closing curly brace (}) you can omit the semicolon. After that you can remove the } and p { that are extra.






share|improve this answer





























    3














    Just add them all in to the same declaration, like so



    p { 
    text-align: justify;
    font-size: xx-small;
    color: aqua;
    }





    share|improve this answer





























      1














      If i understood your question correctly you can write your styles like this ( see snippet below )






      p {
      text-align: justify;
      color: aqua;
      font-size: xx-small
      }

      <p>
      Some text
      </p>








      share|improve this answer





























        1














        p {
        text-align: justify;
        font-size: xx-small;
        color: aqua;
        }





        share|improve this answer





















        • Hi Geetesh. The answer you've given has already been given and that answer has a bit of explanation also. At SO we dont recommend posting "just code" answers, but with at least a basic form of explanation. Also, if an answer already exists (as was the case before you posted), it's better not to post, unless you have actual new/extra value to add :)
          – Martijn
          Nov 12 '18 at 13:09










        • As you have the same answer as Darren, you likely agree with his answer. That is when you upvote some else's answer :)
          – Martijn
          Nov 12 '18 at 13:10


















        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        1














        It is the semicolon ; that is missing in your code. Normally a CSS rule ends with a semicolon. Only after the last rule before a closing curly brace (}) you can omit the semicolon. After that you can remove the } and p { that are extra.






        share|improve this answer


























          1














          It is the semicolon ; that is missing in your code. Normally a CSS rule ends with a semicolon. Only after the last rule before a closing curly brace (}) you can omit the semicolon. After that you can remove the } and p { that are extra.






          share|improve this answer
























            1












            1








            1






            It is the semicolon ; that is missing in your code. Normally a CSS rule ends with a semicolon. Only after the last rule before a closing curly brace (}) you can omit the semicolon. After that you can remove the } and p { that are extra.






            share|improve this answer












            It is the semicolon ; that is missing in your code. Normally a CSS rule ends with a semicolon. Only after the last rule before a closing curly brace (}) you can omit the semicolon. After that you can remove the } and p { that are extra.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 12 '18 at 13:13









            HerrSerkerHerrSerker

            20k84779




            20k84779

























                3














                Just add them all in to the same declaration, like so



                p { 
                text-align: justify;
                font-size: xx-small;
                color: aqua;
                }





                share|improve this answer


























                  3














                  Just add them all in to the same declaration, like so



                  p { 
                  text-align: justify;
                  font-size: xx-small;
                  color: aqua;
                  }





                  share|improve this answer
























                    3












                    3








                    3






                    Just add them all in to the same declaration, like so



                    p { 
                    text-align: justify;
                    font-size: xx-small;
                    color: aqua;
                    }





                    share|improve this answer












                    Just add them all in to the same declaration, like so



                    p { 
                    text-align: justify;
                    font-size: xx-small;
                    color: aqua;
                    }






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 12 '18 at 13:04









                    Darren SweeneyDarren Sweeney

                    11.1k2679152




                    11.1k2679152























                        1














                        If i understood your question correctly you can write your styles like this ( see snippet below )






                        p {
                        text-align: justify;
                        color: aqua;
                        font-size: xx-small
                        }

                        <p>
                        Some text
                        </p>








                        share|improve this answer


























                          1














                          If i understood your question correctly you can write your styles like this ( see snippet below )






                          p {
                          text-align: justify;
                          color: aqua;
                          font-size: xx-small
                          }

                          <p>
                          Some text
                          </p>








                          share|improve this answer
























                            1












                            1








                            1






                            If i understood your question correctly you can write your styles like this ( see snippet below )






                            p {
                            text-align: justify;
                            color: aqua;
                            font-size: xx-small
                            }

                            <p>
                            Some text
                            </p>








                            share|improve this answer












                            If i understood your question correctly you can write your styles like this ( see snippet below )






                            p {
                            text-align: justify;
                            color: aqua;
                            font-size: xx-small
                            }

                            <p>
                            Some text
                            </p>








                            p {
                            text-align: justify;
                            color: aqua;
                            font-size: xx-small
                            }

                            <p>
                            Some text
                            </p>





                            p {
                            text-align: justify;
                            color: aqua;
                            font-size: xx-small
                            }

                            <p>
                            Some text
                            </p>






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 12 '18 at 13:05









                            Mihai TMihai T

                            10.8k1723




                            10.8k1723























                                1














                                p {
                                text-align: justify;
                                font-size: xx-small;
                                color: aqua;
                                }





                                share|improve this answer





















                                • Hi Geetesh. The answer you've given has already been given and that answer has a bit of explanation also. At SO we dont recommend posting "just code" answers, but with at least a basic form of explanation. Also, if an answer already exists (as was the case before you posted), it's better not to post, unless you have actual new/extra value to add :)
                                  – Martijn
                                  Nov 12 '18 at 13:09










                                • As you have the same answer as Darren, you likely agree with his answer. That is when you upvote some else's answer :)
                                  – Martijn
                                  Nov 12 '18 at 13:10
















                                1














                                p {
                                text-align: justify;
                                font-size: xx-small;
                                color: aqua;
                                }





                                share|improve this answer





















                                • Hi Geetesh. The answer you've given has already been given and that answer has a bit of explanation also. At SO we dont recommend posting "just code" answers, but with at least a basic form of explanation. Also, if an answer already exists (as was the case before you posted), it's better not to post, unless you have actual new/extra value to add :)
                                  – Martijn
                                  Nov 12 '18 at 13:09










                                • As you have the same answer as Darren, you likely agree with his answer. That is when you upvote some else's answer :)
                                  – Martijn
                                  Nov 12 '18 at 13:10














                                1












                                1








                                1






                                p {
                                text-align: justify;
                                font-size: xx-small;
                                color: aqua;
                                }





                                share|improve this answer












                                p {
                                text-align: justify;
                                font-size: xx-small;
                                color: aqua;
                                }






                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Nov 12 '18 at 13:07









                                GeeteshGeetesh

                                12417




                                12417












                                • Hi Geetesh. The answer you've given has already been given and that answer has a bit of explanation also. At SO we dont recommend posting "just code" answers, but with at least a basic form of explanation. Also, if an answer already exists (as was the case before you posted), it's better not to post, unless you have actual new/extra value to add :)
                                  – Martijn
                                  Nov 12 '18 at 13:09










                                • As you have the same answer as Darren, you likely agree with his answer. That is when you upvote some else's answer :)
                                  – Martijn
                                  Nov 12 '18 at 13:10


















                                • Hi Geetesh. The answer you've given has already been given and that answer has a bit of explanation also. At SO we dont recommend posting "just code" answers, but with at least a basic form of explanation. Also, if an answer already exists (as was the case before you posted), it's better not to post, unless you have actual new/extra value to add :)
                                  – Martijn
                                  Nov 12 '18 at 13:09










                                • As you have the same answer as Darren, you likely agree with his answer. That is when you upvote some else's answer :)
                                  – Martijn
                                  Nov 12 '18 at 13:10
















                                Hi Geetesh. The answer you've given has already been given and that answer has a bit of explanation also. At SO we dont recommend posting "just code" answers, but with at least a basic form of explanation. Also, if an answer already exists (as was the case before you posted), it's better not to post, unless you have actual new/extra value to add :)
                                – Martijn
                                Nov 12 '18 at 13:09




                                Hi Geetesh. The answer you've given has already been given and that answer has a bit of explanation also. At SO we dont recommend posting "just code" answers, but with at least a basic form of explanation. Also, if an answer already exists (as was the case before you posted), it's better not to post, unless you have actual new/extra value to add :)
                                – Martijn
                                Nov 12 '18 at 13:09












                                As you have the same answer as Darren, you likely agree with his answer. That is when you upvote some else's answer :)
                                – Martijn
                                Nov 12 '18 at 13:10




                                As you have the same answer as Darren, you likely agree with his answer. That is when you upvote some else's answer :)
                                – Martijn
                                Nov 12 '18 at 13:10



                                Popular posts from this blog

                                Full-time equivalent

                                さくらももこ

                                13 indicted, 8 arrested in Calif. drug cartel investigation