markvs Posted September 17, 2012 Report Posted September 17, 2012 I'm not sure if I should use the break tag or not. Will it affect a site using a responsive web design approach? What about semantics? Is there ever a situation to where it's acceptability to use a break tag in modern web design? Maybe a link to a current article would be helpful. Thanks Quote
administrator Posted September 17, 2012 Report Posted September 17, 2012 These days <br> tags are used in very rare circumstances, as it is a formatting element in HTML - typically you use CSS for formatting. I would use it in quick-fix situations only. But it will not break your page, if you use them sparingly. But, I am a little loose and wild when it comes to tags, so others might take issue with my easy going disposition. Stefan Quote
markvs Posted September 17, 2012 Author Report Posted September 17, 2012 Thanks Stefan, What about inline styles? Quote
Andrea Posted September 17, 2012 Report Posted September 17, 2012 There is a specific purpose for the break tag which is a line break. It is NOT meant to create space of in place of paragraph tags. Inline styles make sense if the particular style is used one time on one single spot on your entire site. Quote
markvs Posted September 17, 2012 Author Report Posted September 17, 2012 There is a specific purpose for the break tag which is a line break. It is NOT meant to create space of in place of paragraph tags. Can you give an example of when using a break tag is acceptable. Thanks Quote
Andrea Posted September 17, 2012 Report Posted September 17, 2012 For Example: <p>123 Main Street<br> Some Town, US<br> 555-555-5555 </p> or <p>One verse<br> of a poem</p> <p>Second verse<br> of the poem</p> Quote
markvs Posted September 18, 2012 Author Report Posted September 18, 2012 Is this how you would right the code for several addresses, maybe give the paragraphs holding them a class, or is there a better solution for this? Quote
Andrea Posted September 18, 2012 Report Posted September 18, 2012 For several, I'd surround each one in a p tag. The class would be needed if you want to apply specific styling to your addresses - or you could apply the styling to the containing div. For example: <div id="address"> <p>Street 1<br>Town 1</p> <p>Street 2<br>Town 2</p> </div> #address p {whatever;} Quote
Wickham Posted September 18, 2012 Report Posted September 18, 2012 (edited) For addresses there is the address tag http://htmlhelp.com/reference/html40/block.html http://www.w3schools.com/tags/tag_address.asp but you have to style it how you want as it has deafult styling which you may not like. Most browsers render it in italic unless you change that. Edited September 18, 2012 by Wickham Quote
Andrea Posted September 18, 2012 Report Posted September 18, 2012 Per WDG, the address tag is not for a postal address but rather for contact information. See: http://htmlhelp.com/reference/html40/block/address.html The ADDRESS element provides contact information for a document or part of a document. Information provided by ADDRESS may include the names of the document's maintainers, links to the maintainers' Web pages, e-mail addresses for feedback, postal addresses, phone numbers, and so on. The ADDRESS element is not appropriate for all postal and e-mail addresses; it should be reserved for providing such information about the contact people for the document. W3Schools kind of muddles the two. Quote
Johnclr Posted April 19, 2013 Report Posted April 19, 2013 (edited) using <br> tag is line break. Edited April 19, 2013 by Andrea Link Deleted Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.