HighDots Forums  

What's acceptable for paragraphs?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss What's acceptable for paragraphs? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
 
Posts: n/a

Default What's acceptable for paragraphs? - 12-12-2003 , 09:26 PM






Could someone cite some offical rule or documentation with regard to the <P>
tag? I've seen folks put it in between paragraphs... and others wrap it
around a paragraph. I'd think to use it effectively, it'd have to be
wrapped, correct?

Thanks,

- Michael



Reply With Quote
  #2  
Old   
Andrew Thompson
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-12-2003 , 11:30 PM






<flyinabox (AT) sbcglobal (DOT) net> wrote

Quote:
Could someone cite some offical rule
Don't know about rule so much as a standard
or guideline.

Quote:
..or documentation with regard to the <P
tag?
Well, that would have to be..
http://www.w3.org/MarkUp/

Quote:
..I've seen folks put it in between paragraphs...
That's idiotic (AFAIU). Some broswers would
ingore the empty paragraph while others would
add extra space - good if you are after a page
that renders differently on every browser..

Quote:
..and others wrap it
around a paragraph.
The <p> tag is intended to contain 'a paragraph'
so that would be appropriate.

Quote:
..I'd think to use it effectively, it'd have to be
wrapped, correct?
That agrees with my understanding.

Of course, I should point out that the <p>
tag is html, rather than css (i.e. stylesheets)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site




Reply With Quote
  #3  
Old   
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-13-2003 , 12:58 AM



Thanks Andrew. And, sorry. I'd failed to point out that I was trying to
understand the <p> tag in relation to using it with a CSS class or ID.

Regards,

- Michael

"Andrew Thompson" <andrew64 (AT) bigNOSPAMpond (DOT) com> wrote

Quote:
flyinabox (AT) sbcglobal (DOT) net> wrote in message
news:UFvCb.2483$Ym5.2341 (AT) newssvr23 (DOT) news.prodigy.com...
Could someone cite some offical rule

Don't know about rule so much as a standard
or guideline.

..or documentation with regard to the <P
tag?

Well, that would have to be..
http://www.w3.org/MarkUp/

..I've seen folks put it in between paragraphs...

That's idiotic (AFAIU). Some broswers would
ingore the empty paragraph while others would
add extra space - good if you are after a page
that renders differently on every browser..

..and others wrap it
around a paragraph.

The <p> tag is intended to contain 'a paragraph'
so that would be appropriate.

..I'd think to use it effectively, it'd have to be
wrapped, correct?

That agrees with my understanding.

Of course, I should point out that the <p
tag is html, rather than css (i.e. stylesheets)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site





Reply With Quote
  #4  
Old   
Anne van Kesteren
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-13-2003 , 12:58 AM



Andrew Thompson wrote:
Quote:
flyinabox (AT) sbcglobal (DOT) net> wrote in message
news:UFvCb.2483$Ym5.2341 (AT) newssvr23 (DOT) news.prodigy.com...

Could someone cite some offical rule


Don't know about rule so much as a standard
or guideline.


..or documentation with regard to the <P
tag?


Well, that would have to be..
http://www.w3.org/MarkUp/


..I've seen folks put it in between paragraphs...


That's idiotic (AFAIU).
Isn't that perfectly valid HTML?

<p>Paragraph
<p>Paragraph
etc.

Since the browser needs to close it for you in HTML?

Quote:
..I'd think to use it effectively, it'd have to be
wrapped, correct?
As I said, this isn't required for HTML, the browser will close it for
you, though if you want to make sure _every_ browser understands it (and
it is more future compatible) you are best of using:

<p>Paragraph</p>
<p>Paragraph</p>
etc.

--
Anne van Kesteren
<http://www.annevankesteren.nl/>


Reply With Quote
  #5  
Old   
Andrew Thompson
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-13-2003 , 02:58 AM



"Anne van Kesteren" <mail (AT) annevankesteren (DOT) nl> wrote

....
Quote:
As I said, this isn't required for HTML, the browser will close it for
you, though if you want to make sure _every_ browser understands it .....
I'll choose to entirely ignore the technical
correctness of what you write, in order to quip..

<utter sarcasm>
NOOO! I actually want to reject every 20th
or so visitor based purely on their choice (or
sometimes not _their_ choice) of browser!
</utter sarcasm> ;-)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site




Reply With Quote
  #6  
Old   
David Dorward
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-13-2003 , 03:23 AM



flyinabox (AT) sbcglobal (DOT) net wrote:

Quote:
Could someone cite some offical rule or documentation with regard to the
P> tag? I've seen folks put it in between paragraphs... and others wrap
it around a paragraph.
If you are writing HTML that accurately describes a document, then all
paragraphs must be marked up as a <p> element.

In HTML a <p> element begins when the parser hits a <p> tag and ends when it
hits either a </p> tag OR a tag which can not occur in a paragraph (such as
a <p> tag or a <table> tag). This is because in HTML the closing tag for a
paragraph is optional.

In XHTML there are no optional closing tags, so the </p> tag is required.

Even in HTML its better to closing tags all the time as it makes it easier
to spot mistakes, and for potential future migration to XHTML.

--
David Dorward <http://dorward.me.uk/>


Reply With Quote
  #7  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-13-2003 , 05:21 AM



David Dorward <dorward (AT) yahoo (DOT) com> wrote:

Quote:
If you are writing HTML that accurately describes a document, then
all paragraphs must be marked up as a <p> element.
And _only_ paragraphs. It is relatively common to use paragraph markup
for short greetings, like <p>Welcome to Our Cool Site!!!</p>, which
would better be marked up as <div>. It's of course somewhat debatable
what constitutes a paragraph, but I would say that it normally consists
of two or more sentences (full sentences, with predicates). And one
often sees <p>&nbsp;</p>, usually generated by clueless authoring
software, which sure aren't paragraphs but just attempts to create some
empty space, or something.

From the CSS point of view, the important thing is that if you use
markup like

<h2>heading</h2>
text1
<p>
text2
<p>
text3

which is still fairly common*), then text1 is not a p element and no
rules for p apply to it. It's just text content, probably inside <body>
only, and styling it is rather difficult.

*) Originally, in pre-HTML 2.0 unofficial drafts and descriptions, <p>
was specifically a paragraph separator, and no </p> tag was even
allowed. It was changed to a tag that starts a container element, which
will terminate either implicitly or with </p>, in HTML 2.0, and that's
how things have always been in HTML (until XHTML even made an explicit
</p> obligatory). But people _still_ use <p> the old way. This probably
reflects a wrong view on markup more than anything else - but when
using CSS, you _must_ learn to think in terms of elements, not
separators.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #8  
Old   
Stan Brown
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-13-2003 , 09:05 AM



In article <UFvCb.2483$Ym5.2341 (AT) newssvr23 (DOT) news.prodigy.com> in
comp.infosystems.www.authoring.stylesheets,
<flyinabox (AT) sbcglobal (DOT) net> wrote:
Quote:
Could someone cite some offical rule or documentation with regard to the <P
tag? I've seen folks put it in between paragraphs... and others wrap it
around a paragraph. I'd think to use it effectively, it'd have to be
wrapped, correct?
This is not a style-sheet question, but an HTML one. I've redirected
followups appropriately.

The correct markup for a paragraph is
<p>paragraph text</p>

However, browsers are supposed to treat
<p>
paragraph text
</p>
identically to the above, and the closing </p> tag is optional. Thus
you end up with correct markup that looks like <p> between
paragraphs instead of <p>...</p> surrounding paragraphs.

Of course if you mean literally "between paragraphs" then you'd be
missing the <p> before the first paragraph of the document; first
paragraph after every <h1>, <h2>, etc. heading; first paragraph
after any </ol> or </ul> or </dl>; first paragraph after any
</table> or </pre>, and so forth.

While those <p> tags are required, it's usually not too obvious if
you omit them, unless you're using style sheets to specify
paragraph format. If you are using a style sheet, the "paragraphs"
that don't actually begin with <p> tags will be styled differently
from the ones that do.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/


Reply With Quote
  #9  
Old   
Stan Brown
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-13-2003 , 09:06 AM



In article <jMyCb.199$9G2.137988197 (AT) newssvr11 (DOT) news.prodigy.com> in
comp.infosystems.www.authoring.stylesheets,
<DELETEMEFIRSTflyinabox (AT) sbcglobal (DOT) net> wrote:
Quote:
Thanks Andrew. And, sorry. I'd failed to point out that I was trying to
understand the <p> tag in relation to using it with a CSS class or ID.
[followed by the previous article]

makes it harder to follow discussions.
before the material you're commenting on, it
When you put your comments

http://oakroadsystems.com/genl/unice.htm#upside

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/


Reply With Quote
  #10  
Old   
Stan Brown
 
Posts: n/a

Default Re: What's acceptable for paragraphs? - 12-13-2003 , 09:08 AM



In article <Xns945087D4D119Ajkorpelacstutfi (AT) 193 (DOT) 229.0.31> in
comp.infosystems.www.authoring.stylesheets, Jukka K. Korpela
<jkorpela (AT) cs (DOT) tut.fi> wrote:
Quote:
And _only_ paragraphs. It is relatively common to use paragraph markup
for short greetings, like <p>Welcome to Our Cool Site!!!</p>, which
would better be marked up as <div>.
Why would it be better marked up as div? It's a paragraph, isn't it?

I can see giving it a class (or even an ID), but making it div
instead of paragraph? Why do you suggest that.

(Followups set appropriately for this HTML question.)

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.