How to use css to add multiple styles for a paragraph [closed]
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
- Justify
- Small
- 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
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.
add a comment |
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
- Justify
- Small
- 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
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
add a comment |
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
- Justify
- Small
- 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
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
- Justify
- Small
- 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
html css html5 css3
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
add a comment |
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
add a comment |
4 Answers
4
active
oldest
votes
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.
add a comment |
Just add them all in to the same declaration, like so
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
add a comment |
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>
add a comment |
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
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
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 12 '18 at 13:13
HerrSerkerHerrSerker
20k84779
20k84779
add a comment |
add a comment |
Just add them all in to the same declaration, like so
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
add a comment |
Just add them all in to the same declaration, like so
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
add a comment |
Just add them all in to the same declaration, like so
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
Just add them all in to the same declaration, like so
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
answered Nov 12 '18 at 13:04
Darren SweeneyDarren Sweeney
11.1k2679152
11.1k2679152
add a comment |
add a comment |
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>
add a comment |
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>
add a comment |
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>
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>
answered Nov 12 '18 at 13:05
Mihai TMihai T
10.8k1723
10.8k1723
add a comment |
add a comment |
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
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
add a comment |
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
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
add a comment |
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
p {
text-align: justify;
font-size: xx-small;
color: aqua;
}
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
add a comment |
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
add a comment |
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