+ 3
Will the paragraph appears center in the page?
I just came up with this question in a challenge. Given markup as follows. <p align="center">Text</p> We all know that the <p> element is a block level element and will never be centered unless someone makes it as a inline element. Here only the "Text", paragraph text will be aligned in center format. I would like to know about your thoughts on this question. For the record correct answer was the "Yes". But I guess it should be "No" since it asks about the paragraph element itself.
5 odpowiedzi
+ 2
Yes, text inside p tag with align attribute set to center would make the text center, due to p is display block which occupy 100% width of parent.
if you set p tag to inline, its text can't be center even though with align attribute set to center, since p tag is not 100% width now.
There is a text node inside p tag, you must take into consideration in alignment.
+ 2
Thanks to both. I think the question should be more specific. Just my personal thoughts.
+ 1
I think that it is asking about the content in the paragraph. I think that this question is right.
+ 1
Couldn't get your question. Can you explain?
0
Which tag for title