Etiam tristique convallis rutrum. Phasellus id mi neque. Vivamus gravida aliquam condimentum. If in the future you wish to style one of these parts, it will be much easier to do so at the block level. Use it when you want the text to continue on the next line, such as with poetry.
I may be breaking rules of etiquette when answering a question in this thread —as most of the answers thus far have been great —but here's how I approach this argument:. While I agree that a 'p' is element which is used to hold text and a 'br' tag is used to break text, in many occasions one may want to manipulate a 'block' of text that have actual line spaces between them;.
Ex: [my block of text] Hello World! Now many would argue that you can just place two 'p' elements in a 'div' and then manipulate that 'div', however I feel this is more time consuming aka I'm lazy , and thus I stick with a double 'br' method —leaving me to manipulate just that one 'p. The issue with my unorthodox method is that if there is a specific styling applied to line-height, then there will definitely be a noticeable difference between the line-space created by a double 'br' vs.
A paragraph from the Greek paragraphos, "to write beside" or "written beside" is a self-contained unit of a discourse in writing dealing with a particular point or idea. Of course, this is merely an opinion as I assume most answers will be.
If you are using the following:. Then I would argue that you should use styles on one or both of the tags surrounding the p. The p tag is a block level element, and is mainly used to add content, whereas the br tag is used to force a line-break within the element. That is, if you're going to follow semantics. A lot of people are doing that these days to add specific meaning to tags and whatnot. I hope that helps. Good luck, though. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 8 years, 11 months ago. Active 2 years, 10 months ago. Viewed k times. Improve this question. Add a comment. Active Oldest Votes. They serve two different functions. Improve this answer. Select basic ads. Create a personalised ads profile.
Select personalised ads. Apply market research to generate audience insights. Measure content performance. Develop and improve products. List of Partners vendors. Share Flipboard Email.
Jennifer Kyrnin. Featured Video. Cite this Article Format. Kyrnin, Jennifer. How to Create Whitespace With 'p' and 'br' Tags. Your Privacy Rights. To change or withdraw your consent choices for ThoughtCo. At any time, you can update your settings through the "EU Privacy" link at the bottom of any page. These choices will be signaled globally to our partners and will not affect browsing data. We and our partners process data to: Actively scan device characteristics for identification.
0コメント