This exercise says that the content of an <a> tag will display on the same line as surrounding text. What if there is text near an <a> element contained within a sibling <p> element? Will the content of these two tags display adjacent to each other?


#1

Question

This exercise says that the content of an tag will display on the same line as surrounding text. What if there is text near an element contained within a sibling

element? Will the content of these two tags display adjacent to each other?

Answer

No. Not unless the default display value of the <p> element is changed. By default, the <p> element is a block level element. This means it will take up the full width of it’s container, thereby pushing any adjacent inline or block level elements out of the way and onto a new line.