The paragraph is going onto a new line after the link in HTML

im blue

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?

PolygonParrot

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:

  • Change the style with CSS class, via the ID or set with style = "display: inline;"

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>
  • Benefit of a different tag

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Html paragraph and fieldset in the same line

From Dev

Why is this text pushing the div onto a new line?

From Dev

strategy to fprintf into a file from a buffer but going to a new line after every 100 characters?

From Dev

Why does "p" element after "ul" not start in a new line? The contents of the paragraph continue in the same line as navigation(created using ul)

From Dev

Issue on Adding Horizontal Line Before and After Paragraph

From Dev

Notepad ++ add new paragraph after specific symbol

From Dev

Notepad ++ add new paragraph after specific symbol

From Dev

Insert HTML after certain paragraph of HTML string

From Dev

Div element not going to new line in css

From Dev

Bootstrap nav menu going to new line

From Dev

How to avoid going to new line with stdin in Rust

From Dev

Replace all dots in paragraph with new line except that dots between numbers and after Dr., Mr., Bsc. .... etc

From Dev

Add Element/Paragraph after html BR?

From Dev

pug pretty option - new line after 'a' tag in HTML output

From Dev

Stop <p> tags from wrapping onto a new line

From Dev

<br> not breaking onto new line, view source also displaying <br>

From Dev

Why does display: flex push the following element onto a new line?

From Dev

Stop ReSharper from putting JavaScript function parameter onto new line

From Dev

Make the panels go onto the new line when the resolution changes

From Dev

JQuery HTML Form prevent going to a new url

From Dev

Paragraph link outside div after make it float to the right

From Dev

How to maintain indentation if a paragraph takes new line in PdfPCell?

From Dev

Detecting a line break & invoking a new paragraph on the output in PHP

From Dev

Parsing HTML - searching links - is it possible to search paragraph that a link is contained in?

From Dev

New tab after clicking a link

From Dev

New line in html table

From Dev

HTML New Line with Bootstrap

From Dev

new line in HTML

From Dev

New line in html table

Related Related

  1. 1

    Html paragraph and fieldset in the same line

  2. 2

    Why is this text pushing the div onto a new line?

  3. 3

    strategy to fprintf into a file from a buffer but going to a new line after every 100 characters?

  4. 4

    Why does "p" element after "ul" not start in a new line? The contents of the paragraph continue in the same line as navigation(created using ul)

  5. 5

    Issue on Adding Horizontal Line Before and After Paragraph

  6. 6

    Notepad ++ add new paragraph after specific symbol

  7. 7

    Notepad ++ add new paragraph after specific symbol

  8. 8

    Insert HTML after certain paragraph of HTML string

  9. 9

    Div element not going to new line in css

  10. 10

    Bootstrap nav menu going to new line

  11. 11

    How to avoid going to new line with stdin in Rust

  12. 12

    Replace all dots in paragraph with new line except that dots between numbers and after Dr., Mr., Bsc. .... etc

  13. 13

    Add Element/Paragraph after html BR?

  14. 14

    pug pretty option - new line after 'a' tag in HTML output

  15. 15

    Stop <p> tags from wrapping onto a new line

  16. 16

    <br> not breaking onto new line, view source also displaying <br>

  17. 17

    Why does display: flex push the following element onto a new line?

  18. 18

    Stop ReSharper from putting JavaScript function parameter onto new line

  19. 19

    Make the panels go onto the new line when the resolution changes

  20. 20

    JQuery HTML Form prevent going to a new url

  21. 21

    Paragraph link outside div after make it float to the right

  22. 22

    How to maintain indentation if a paragraph takes new line in PdfPCell?

  23. 23

    Detecting a line break & invoking a new paragraph on the output in PHP

  24. 24

    Parsing HTML - searching links - is it possible to search paragraph that a link is contained in?

  25. 25

    New tab after clicking a link

  26. 26

    New line in html table

  27. 27

    HTML New Line with Bootstrap

  28. 28

    new line in HTML

  29. 29

    New line in html table

HotTag

Archive