I'm trying to display a paragraph that has a centered
phrase,
such as this one,
in the middle of the paragraph. An example is the section
"End of semester project" on my course-page
=============== =============== =============== ===============
In the past, I have used this structure:
<p>I'm trying to display a paragraph that has a centered
phrase,
<center>such as this one,</center>
in the middle of the paragraph.</p>
This, or with the <centerreplac ed by
<div align="center"> .
In both cases, the text displays the way I would like.
Alas, the page doesn't validate completely at
Rather, I get this error:
Error Line 377, Column 7: end tag for
element "P" which is not open.
My *guess* as to why this is happening is that the
presence a of a block element (either "div" or "center")
inside of a <pis causing a </pto be inserted before
the block element.
=============== =============== =============== ===============
It would not be disaster if I had to typeset this as
<p>I'm trying to display a paragraph that has a centered
phrase,</p>
<center>such as this one,</center>
<p>in the middle of the paragraph.</p>
but I'm wondering if I can
* typeset it as a single paragraph, the way I think of it,
* have a centered fragment (like a "displayed equation" in
a mathematics textbook)
* have the document validate.
Sincerely,
Prof. Jonathan King (gentsquash)
Mathematics dept, Univ. of Florida
phrase,
such as this one,
in the middle of the paragraph. An example is the section
"End of semester project" on my course-page
=============== =============== =============== ===============
In the past, I have used this structure:
<p>I'm trying to display a paragraph that has a centered
phrase,
<center>such as this one,</center>
in the middle of the paragraph.</p>
This, or with the <centerreplac ed by
<div align="center"> .
In both cases, the text displays the way I would like.
Alas, the page doesn't validate completely at
Rather, I get this error:
Error Line 377, Column 7: end tag for
element "P" which is not open.
My *guess* as to why this is happening is that the
presence a of a block element (either "div" or "center")
inside of a <pis causing a </pto be inserted before
the block element.
=============== =============== =============== ===============
It would not be disaster if I had to typeset this as
<p>I'm trying to display a paragraph that has a centered
phrase,</p>
<center>such as this one,</center>
<p>in the middle of the paragraph.</p>
but I'm wondering if I can
* typeset it as a single paragraph, the way I think of it,
* have a centered fragment (like a "displayed equation" in
a mathematics textbook)
* have the document validate.
Sincerely,
Prof. Jonathan King (gentsquash)
Mathematics dept, Univ. of Florida
Comment