Tribute page how to center the quote

I dont know how to center the quote that comes after the title. Please help me. Also my page looks very bland and I don’t know how to make it look better.

my code so far:

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Challenge: Build a Tribute Page

Link to the challenge:

you want to center your second sentence “energy equals to …”

like this


you can achive this using text-align property

@lilpoopstain360 ,

Wrap your Quotes tag(<em>) inside a <p> tag and give text-align: center; to the

tag in css section.

Few points to make your page look better:

  • Give some nice background colour(mild colours).

  • Make your image big than the description below.

  • Make sure to give different fonts style for the heading and the content

can you give me an example code please? Thank you .
I tried p em {text-align: center;} and that didnt work. I also tried p q em {text-align:center;} that also changed nothing

@lilpoopstain360 ,

Since you wrapped <p> tag around <em> tag,

you can style the <p> tag alone like this in CSS section

p{
  text-align: center
}

This will work

1 Like

it worked! thank you sm

oh wait no i just wanted to center the quote specifically, not the other paragraphs :frowning: how do I do that?

@lilpoopstain360

You can give class or id for that particular <p> tag and you can add css property for that class name or id name

Example:
In HTML
<p class="content">I am a paragraph</p>

In CSS:

.content{
text-align: center
}

Hope that helps

1 Like

Yes this worked thank you so much :sob:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.