How do you write two lines in html?
I have a HTML document with some distinct rows of text, is there some decided correct way to display them? Example:
Should I use the Examples:
or
Or something completely different? The CSS & other things isn't really relevant at the moment, I'm just wondering which is the "most correct" way to use.
BoltClock 675k155 gold badges1362 silver badges1334 bronze badges asked Apr 8, 2018 at 15:52
Sebastian NorrSebastian Norr 6,3222 gold badges11 silver badges16 bronze badges 2 if you have a string with new lines that you want to display for example in a div, you can use
answered Nov 1, 2019 at 15:27
1 Or you can try this without tag wrapping each line:
answered Mar 2 at 7:33
Lerner ZhangLerner Zhang 5,4522 gold badges42 silver badges57 bronze badges 1 The correct way to do things is using things made for the things you need. If you want a line break (enter), use answered Apr 8, 2018 at 16:40
D. PardalD. Pardal 5,7641 gold badge16 silver badges35 bronze badges
According to this, the w3schools comes with a marvelous article about style guides and coding conventions.
answered Apr 8, 2018 at 16:04
0 There is no such thing in most correct way, at least according to the current specification of your needs. Yes, you can put them all in separate paragraphs, using the answered Apr 8, 2018 at 16:06
Lajos ArpadLajos Arpad 56.9k32 gold badges94 silver badges162 bronze badges If you want to create a multiline paragraph that maintains the line seperation in your code without throwing answered Dec 23, 2021 at 4:20
1 How do I make two lines of text in HTML?Creating Line Breaks
The
tag is used to insert a line break on the web page. Since the is an empty element, so there is no need of corresponding tag. How do you put multiple line breaks in HTML?Each
tag inserts an additional line break on the page. Therefore, you can code multiple tags back-to-back to produce multiple blank lines down the page. |