Jump to content
Killersites Forums

The Break Tag


markvs
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;}

Link to comment
Share on other sites

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 by Wickham
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 7 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...