Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Web Technology by (20.3k points)

output:

hello 

How are you

code:

<p>hello <br> How are you </p>

How to achieve same output without <br>?

1 Answer

0 votes
by (40.7k points)

You can use a span tag that you can then display as blocks (just like an <div> actually).

In HTML:

<p><span>hello</span><span>How are you</span></p>

In CSS:

p span 

{

    display: block;

}

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...