Here are the contents of my body:
<a href = "https://www.google.com" target = "__blank">Click to go to google</a>
<p>This should appear next to the link, instead of on the next line</p>
When I run this on my browser (chrome) it appears to show it like this
Link to google
Text
How would I make it appear on one line, paragraph after href?
The tag p stands for paragraph. So it makes sense that the text in the p stands in a new line and fills the whole width of the parent. By default, p has the property "display: block".
For having the text in the same row as the a we have some possibilities:
Example
<a href="https://www.google.com" target="__blank"> Click to go to google </a>
<p style="display:inline;"> This should appear next to the link, instead of the next line </p>
Example:
<a href="https://www.google.com" target="__blank"> Click to go to google</a>
<span> This should appear next to the link, instead of the next line </span>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments