Go Back   Free website templates > Web Template Help > HTML - XHTML - CSS
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Join now to download all the free website templates or post on the forum. If you have never been on a forum before read the FAQ. It's quick, easy and free to join!
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-21-2009, 09:25 AM
pusscat's Avatar
Member
 
Join Date: Oct 2009
Posts: 59
pusscat will become famous soon enough
Default line break question

If using the line break do you need a opening tag for it aswell as a closing one.

example

<br>text here</br>

or is it

<b>text here</br> or is the slash after the br

as am validating my pages as make them and getting errors on one or two
pages and its the </br> that has the problem everything else validates great
I need the line breaks in some of the paragraphs

Thanks

Angie
Reply With Quote
  #2 (permalink)  
Old 10-21-2009, 11:10 AM
ishkey's Avatar
Moderator
 
Join Date: Aug 2007
Location: North GA USA
Posts: 1,360
ishkey will become famous soon enough
Default

Depending on which DTD (Document Type Definition) you have in the top of your page determines which style to use.

<br> - Is HTML complaint.
<br /> - Is xHTML complaint

they are stand alone tags, just like the <hr> tag creates a horizontal line in an HTML page.

example
Code:
<p>YourName<br>123 Street<br>Some Town</p>
code would output:
YourName
123 Street
Some Town
__________________
RIF= Reading Is Fun - Understanding Funner
cleandeck - lawn mower undercoating and wilmargraphite - graphite lubricants
Reply With Quote
  #3 (permalink)  
Old 10-21-2009, 03:26 PM
pusscat's Avatar
Member
 
Join Date: Oct 2009
Posts: 59
pusscat will become famous soon enough
Default

The following is the Doc Type
Am taking it that it will be <br />
When validating its coming up with a problem with the <br /> tags so am a bit unsure why now.
There is no opening tag I take it?

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">



Reply With Quote
  #4 (permalink)  
Old 10-21-2009, 03:44 PM
pusscat's Avatar
Member
 
Join Date: Oct 2009
Posts: 59
pusscat will become famous soon enough
Default

Ok took html through html tidy and that found no problems, so re-validated it and its come up with no problems

which is wierd as havent made any changes to it since last validated and it came up with errors

But aslong as its clean thats the main thing

Thanks for the help is appreciated


Angie
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:57 PM.



mouseover mouseover mouseover