Click here to get back home

Do I need a

inside a

?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Do I need a

inside a

David Stone 01-31-2008
Posted by David Stone on January 31, 2008, 1:08 pm
Please log in for more thread options
If I have a div containing _only_ a single line of text, containing
only such elements as <span> or <a>, is it _required_ to nest
that text within a <p> under html 4?

Example:

<div class="fine-print">
Standard <a href="disclaimer.html">disclaimers</a> apply
</div>

- or -

<div class="fine-print">
<p>Standard <a href="disclaimer.html">disclaimers</a> apply</p>
</div>

?

Posted by VK on January 31, 2008, 1:39 pm
Please log in for more thread options
> If I have a div containing _only_ a single line of text, containing
> only such elements as <span> or <a>, is it _required_ to nest
> that text within a <p> under html 4?

Of course not. You can put either block and inline element in it.

http://www.w3.org/TR/html4/strict.dtd


Posted by Harlan Messinger on January 31, 2008, 1:51 pm
Please log in for more thread options
David Stone wrote:
> If I have a div containing _only_ a single line of text, containing
> only such elements as <span> or <a>, is it _required_ to nest
> that text within a <p> under html 4?
>
> Example:
>
> <div class="fine-print">
> Standard <a href="disclaimer.html">disclaimers</a> apply
> </div>
>
> - or -
>
> <div class="fine-print">
> <p>Standard <a href="disclaimer.html">disclaimers</a> apply</p>
> </div>

No, not at all, though if the content is basically a paragraph in form,
then semantically speaking it should be in a <p> anyway.

Posted by Andreas Prilop on February 1, 2008, 9:13 am
Please log in for more thread options
On Thu, 31 Jan 2008, David Stone wrote:

> <div class="fine-print">
> Standard <a href="disclaimer.html">disclaimers</a> apply
> </div>
>
> - or -
>
> <div class="fine-print">
> <p>Standard <a href="disclaimer.html">disclaimers</a> apply</p>
> </div>

Get rid of divitis!

<p class="fine-print">Standard
<a href="disclaimer.html">disclaimers</a> apply</p>

--
Bugs in Internet Explorer 7
http://www.unics.uni-hannover.de/nhtcapri/ie7-bugs

Posted by Jukka K. Korpela on February 1, 2008, 2:03 pm
Please log in for more thread options
Scripsit Andreas Prilop:

> On Thu, 31 Jan 2008, David Stone wrote:
>
>> <div class="fine-print">
>> Standard <a href="disclaimer.html">disclaimers</a> apply
>> </div>

There's nothing wrong with that as markup, except perhaps the class
name.

> Get rid of divitis!
>
> <p class="fine-print">Standard
> <a href="disclaimer.html">disclaimers</a> apply</p>

Stop p'ing. Three words don't constitute a paragraph.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Similar ThreadsPosted
img inside pre September 17, 2005, 10:04 pm
What can be inside an tag? January 8, 2006, 7:56 pm
linebreak ignored inside
July 31, 2006, 9:54 am
is it acceptable to put a UL inside of a paragraph?? October 1, 2004, 11:01 am
help with image alignment inside a
March 19, 2005, 9:11 pm
centering a div inside of a div in FireFox May 24, 2005, 2:02 pm
div align bottom inside a td February 5, 2006, 7:27 pm
table inside form? March 31, 2006, 10:50 pm
table inside div block - no joy April 2, 2006, 6:26 pm
Link inside the ZIP file ? December 24, 2006, 4:07 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap