Jump to content

Text: How to use <p> and <br /> tags.


Snot

Recommended Posts

I'm using HTML 4.1 Strict I think.

 

I'm getting some warnings while validating my html about my use of the <br /> tag. I've read some pages and it looks like I'm just typeing it in as if I were using xhtml? I'm not sure if I just need to remove all my end tags and / marks or if i'm using the tags wrong.

 

Example of what i'm doing now.

 

<p> text text text...
...
...
...
lots and lots of text...
</p>

<br />

<p> text text text...
...
...
...
lots and lots of text...
</p>

 

 

From what I read html 4.0 doesn't use end tags. So should i change all of my code to

 

<p> text text text...
...
...
...
lots and lots of text...

<br>

<p> text text text...
...
...
...
lots and lots of text...

 

I'm not sure if this is whats causing my warning or if i'm just using the tags wrong.

 

Thanks for the help.

 

http://validator.w3.org/check?uri=www.wararmada.com%2FTDB&charset=%28detect+automatically%29&doctype=Inline&group=0#result

 

NET-enabling start-tag requires SHORTTAG YES

 

<br />

 

The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

 

Link to comment
https://forums.phpfreaks.com/topic/228229-text-how-to-use-and-tags/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.