Jump to content


Photo

[solved]problams with <br>


  • Please log in to reply
9 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 29 September 2006 - 11:14 AM


edited

thanks everyone cheers.

hi there all hopes ok.

i have a problam i use the following doctype.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR...l4/strict.dtd">


i can not use the
<br>
syntex as it is not valid i am currently using <p>
but what do i do to use
<br>
with the doctype i use thank you.

this is a html quistion but it's also a php quistion as the doctype is used within html and php

advance thank you.

i tried the
<br><br/>
but no joy can you help cheers.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 JasonLewis

JasonLewis
  • Members
  • PipPipPip
  • Advanced Member
  • 3,351 posts
  • LocationVictoria, Australia

Posted 29 September 2006 - 11:28 AM

do you have to use DOCTYPE? in all my websites i never used doctype. you could try <br /> but i dunno.
Good luck with your coding.
Jason / ProjectFear / Jaysonic

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 29 September 2006 - 11:32 AM

you goto use doctype to get on page one of google so i got to.

for a meta tag hack.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 29 September 2006 - 11:55 AM

Why can't you use <br> I thought that was valid in HTML Strict.

Try <br /> It might be that it wants a closing tag.

According to this line in the DTD, it's fine as text markup...

<!ENTITY % special
  "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">


Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 29 September 2006 - 12:01 PM

nope the only way you can use < br > is within a set css < p > very wiered

example only this will get errors


<?php ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> 

<html>

<head>
p.test
{
margin: 1px: auto;
color: blue;
text-weigth: 500px;
background-color: black;
}

<title>hi ya</title>

</head>
<body>
this brake does not work
<br>

this line with brake works
<p class="test">hi there i am <br>reddarrow</p>

</body>
</html>

madness what to do to get a brake before a table i got no idear lol
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#6 AdRock

AdRock
  • Members
  • PipPipPip
  • Advanced Member
  • 911 posts

Posted 29 September 2006 - 12:12 PM

Dunno if it's anything to do with this but if you're using css inline then you should start with <style type="text/css"> and end with </style> and put the css in between
If your topic has been solved, please mark the topic as SOLVED.

This helps others from identifying which topics need help still

#7 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 29 September 2006 - 12:18 PM

<title>hi ya</title>
</head>
<body>
this brake does not work
<br>

this line with brake works
<p class="test">hi there i am <br>reddarrow</p>

</body>
</html>


I hate to say it, but that's correct.  You should always have paragraph tags around your text.

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 29 September 2006 - 12:23 PM

so this dosent exist then were the brake is.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> 

<html>

<head>



<title>hi ya</title>

<style type="text/css">


p.test
{
margin: 1px: auto;
color: blue:
text-weigth: 500px;
background-color: black;
}


</style></head>

<body>

<br>


<p class="test">hi there i am <br>reddarrow</p>

</body>
</html>
error

Line 29 column 3: document type does not allow element "BR" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag.
<br>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 29 September 2006 - 12:28 PM

solved found a way around it

<?php echo"<br><br>";?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#10 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 29 September 2006 - 02:55 PM

is there any way to get the wc3 not to valadate html you want to show but dont wont it valadated but not using the <!-- --> becouse that stop showing the information i want the same but not to valadate the information.

or will i have to use a image

cheers.

<!--
<div class="info">

Doctype Example

</div>

<p class="info">

When using html and css you must use a doctype at the beging of your code. 
<br><br>

Doctype Example

<br>

<textarea class="example_two" >
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> 
</textarea>
-->


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users