473,721 Members | 3,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's acceptable for paragraphs?

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
Jul 20 '05 #1
40 3368
<fl*******@sbcg lobal.net> wrote in message
news:UF******** *********@newss vr23.news.prodi gy.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
Jul 20 '05 #2
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" <an******@bigNO SPAMpond.com> wrote in message
news:0u******** **********@news-server.bigpond. net.au...
<fl*******@sbcg lobal.net> wrote in message
news:UF******** *********@newss vr23.news.prodi gy.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

Jul 20 '05 #3
Andrew Thompson wrote:
<fl*******@sbcg lobal.net> wrote in message
news:UF******** *********@newss vr23.news.prodi gy.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?
..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.annevankest eren.nl/>
Jul 20 '05 #4
"Anne van Kesteren" <ma**@annevanke steren.nl> wrote in message
news:br******** **@reader11.wxs .nl...
....
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
Jul 20 '05 #5
fl*******@sbcgl obal.net wrote:
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/>
Jul 20 '05 #6
David Dorward <do*****@yahoo. com> wrote:
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/
Jul 20 '05 #7
In article <UF************ *****@newssvr23 .news.prodigy.c om> in
comp.infosystem s.www.authoring.stylesheets,
<fl*******@sbcg lobal.net> wrote:
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/
Jul 20 '05 #8
In article <jM************ *********@newss vr11.news.prodi gy.com> in
comp.infosystem s.www.authoring.stylesheets,
<DE************ ********@sbcglo bal.net> wrote:
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/
Jul 20 '05 #9
In article <Xn************ *************** **@193.229.0.31 > in
comp.infosystem s.www.authoring.stylesheets, Jukka K. Korpela
<jk******@cs.tu t.fi> wrote:
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/
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3300
by: Sandman | last post by:
I am splitting a text block into paragraphs, to be able to add images and stuff like that to a specific paragraph in a content management system. Well, right now I'm splittin on two or more newlines, so this text block: Hello, my nickname is Sandman and I am coding some PHP Call me
125
14783
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
47
9147
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
8
6872
by: lkrubner | last post by:
Am I wrong, or do paragraphs have extra space on top in FireFox, when compared to Microsoft IE. The top of this page is an example: http://www.publicdomainsoftware.org/index.php?pageId=299 The text in the box at top looks like it has an extra 10 or 20 pixels of padding at the top, when FireFox is compared to IE. Why is that?
1
1596
by: Pete Griffint | last post by:
Howdy! I want to get the following in a Richtext control: Paragraph 1.... Paragraph 2... Obviously I want to do something like rtb.SelectedText="Paragraph 1..."; rtb.SelectedText=<paragraph break>; (*)
0
1307
by: Josema | last post by:
Hi to all, Im trying to identify separately the tables and the paragraphs of a word document.. When i use the Word.Paragraphs interface to get all the paragraphs of a document i see that inside each cell of each table of a word document are a paragraph...
16
3789
by: danep | last post by:
Hi all, On my site I have a section of code that resembles the following: <p id="gear" style="display: none;"> <p>test</p> </p> This renders fine in Firefox (that is, nothing is displayed). However, in Internet Explorer, "test" is still printed. It appears
1
1714
by: vierow | last post by:
new paragraphs in php mysql I have a php form to upload stories into a mysql database when I retrieve the file "print $row'; all the paragraphs run together. How do I get carriage returns and new paragraphs to carry through. I works fine in the bulletin board I installed, but I can't find the code in all those files. J
5
4467
by: keoo | last post by:
Im putting the part of the code which is relevant to my question......The program is opening the texfile which i already have created..Im not quite managing to make the program count the number of paragraphs found in the text file.. can someone please help me? 10x in advance #include <stdio.h> int main () { int paragraphs = 0; char emptyLine;
0
8852
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9227
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6676
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5992
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4761
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2590
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2143
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.