Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Which is the proper way? (http://www.velocityreviews.com/forums/t160354-which-is-the-proper-way.html)

paul j 12-20-2004 08:35 PM

Which is the proper way?
 
I've heard it said that one should avoid excessive "<br />"'s

So if I have a list of things what is the proper way to code it:

<p class="list">Item A</p>
<p class="list">Item B</p>
<p class="list">Item C</p>

OR:

<p class="list">Item A<br />
Item B<br />
Item C<br /></p>
--
Up from Third Base to Huntington
They sang another victory song...........

Beauregard T. Shagnasty 12-20-2004 08:40 PM

Re: Which is the proper way?
 
paul j wrote:
> I've heard it said that one should avoid excessive "<br />"'s


True enough.

> So if I have a list of things what is the proper way to code it:
>
> <p class="list">Item A</p>
> <p class="list">Item B</p>
> <p class="list">Item C</p>
>
> OR:
>
> <p class="list">Item A<br />
> Item B<br />
> Item C<br /></p>


You did say "list".

<ul>
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>

--
-bts
-This space intentionally left blank.

paul j 12-20-2004 08:41 PM

Re: Which is the proper way?
 
On Mon, 20 Dec 2004 15:40:45 -0500, Beauregard T. Shagnasty wrote:

> paul j wrote:
>> I've heard it said that one should avoid excessive "<br />"'s

>
> True enough.
>
>> So if I have a list of things what is the proper way to code it:
>>
>> <p class="list">Item A</p>
>> <p class="list">Item B</p>
>> <p class="list">Item C</p>
>>
>> OR:
>>
>> <p class="list">Item A<br />
>> Item B<br />
>> Item C<br /></p>

>
> You did say "list".
>
> <ul>
> <li>Item A</li>
> <li>Item B</li>
> <li>Item C</li>
> </ul>


Let's say I don't want it in an ordered or unordered list.
--
Up from Third Base to Huntington
They sang another victory song...........

Steve Pugh 12-20-2004 08:42 PM

Re: Which is the proper way?
 
On Mon, 20 Dec 2004 20:35:27 GMT, paul j <redsoxnut@remove.gmail.com>
wrote:

>I've heard it said that one should avoid excessive "<br />"'s
>
>So if I have a list of things what is the proper way to code it:
>
><p class="list">Item A</p>
><p class="list">Item B</p>
><p class="list">Item C</p>
>
>OR:
>
><p class="list">Item A<br />
>Item B<br />
>Item C<br /></p>


Neither. If it is a list as your class name suggests then the correct
markup must be list markup.

<ul>
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>

Then use CSS if you want to remove the list markers.

Steve


paul j 12-20-2004 08:48 PM

Re: Which is the proper way?
 
On Mon, 20 Dec 2004 20:42:53 +0000, Steve Pugh wrote:

> On Mon, 20 Dec 2004 20:35:27 GMT, paul j <redsoxnut@remove.gmail.com>
> wrote:
>
>>I've heard it said that one should avoid excessive "<br />"'s
>>
>>So if I have a list of things what is the proper way to code it:
>>
>><p class="list">Item A</p>
>><p class="list">Item B</p>
>><p class="list">Item C</p>
>>
>>OR:
>>
>><p class="list">Item A<br />
>>Item B<br />
>>Item C<br /></p>

>
> Neither. If it is a list as your class name suggests then the correct
> markup must be list markup.
>
> <ul>
> <li>Item A</li>
> <li>Item B</li>
> <li>Item C</li>
> </ul>
>
> Then use CSS if you want to remove the list markers.
>
> Steve


I put the word list there, I guess I shouldn't have. What I really have
there is a class that I use to describe the font used.
--
Up from Third Base to Huntington
They sang another victory song...........

Steve Pugh 12-20-2004 08:48 PM

Re: Which is the proper way?
 
On Mon, 20 Dec 2004 20:41:33 GMT, paul j <redsoxnut@remove.gmail.com>
wrote:
>On Mon, 20 Dec 2004 15:40:45 -0500, Beauregard T. Shagnasty wrote:
>> paul j wrote:
>>
>>> So if I have a list of things what is the proper way to code it:
>>>
>>> <p class="list">Item A</p>
>>> <p class="list">Item B</p>
>>> <p class="list">Item C</p>
>>>
>>> OR:
>>>
>>> <p class="list">Item A<br />
>>> Item B<br />
>>> Item C<br /></p>

>>
>> You did say "list".
>>
>> <ul>
>> <li>Item A</li>
>> <li>Item B</li>
>> <li>Item C</li>
>> </ul>

>
>Let's say I don't want it in an ordered or unordered list.


So why did you choose 'list' as a class name? Is it a list or not?

Steve


paul j 12-20-2004 08:50 PM

Re: Which is the proper way?
 
On Mon, 20 Dec 2004 20:48:31 +0000, Steve Pugh wrote:

> On Mon, 20 Dec 2004 20:41:33 GMT, paul j <redsoxnut@remove.gmail.com>
> wrote:
>>On Mon, 20 Dec 2004 15:40:45 -0500, Beauregard T. Shagnasty wrote:
>>> paul j wrote:
>>>
>>>> So if I have a list of things what is the proper way to code it:
>>>>
>>>> <p class="list">Item A</p>
>>>> <p class="list">Item B</p>
>>>> <p class="list">Item C</p>
>>>>
>>>> OR:
>>>>
>>>> <p class="list">Item A<br />
>>>> Item B<br />
>>>> Item C<br /></p>
>>>
>>> You did say "list".
>>>
>>> <ul>
>>> <li>Item A</li>
>>> <li>Item B</li>
>>> <li>Item C</li>
>>> </ul>

>>
>>Let's say I don't want it in an ordered or unordered list.

>
> So why did you choose 'list' as a class name? Is it a list or not?
>
> Steve


I have a class that defines the font there.
--
Up from Third Base to Huntington
They sang another victory song...........

Steve Pugh 12-20-2004 08:56 PM

Re: Which is the proper way?
 
On Mon, 20 Dec 2004 20:48:18 GMT, paul j <redsoxnut@remove.gmail.com>
wrote:

>On Mon, 20 Dec 2004 20:42:53 +0000, Steve Pugh wrote:
>
>> On Mon, 20 Dec 2004 20:35:27 GMT, paul j <redsoxnut@remove.gmail.com>
>> wrote:
>>
>>>I've heard it said that one should avoid excessive "<br />"'s
>>>
>>>So if I have a list of things what is the proper way to code it:
>>>
>>><p class="list">Item A</p>
>>><p class="list">Item B</p>
>>><p class="list">Item C</p>
>>>
>>>OR:
>>>
>>><p class="list">Item A<br />
>>>Item B<br />
>>>Item C<br /></p>

>>
>> Neither. If it is a list as your class name suggests then the correct
>> markup must be list markup.
>>
>> <ul>
>> <li>Item A</li>
>> <li>Item B</li>
>> <li>Item C</li>
>> </ul>
>>
>> Then use CSS if you want to remove the list markers.
>>

>I put the word list there, I guess I shouldn't have. What I really have
>there is a class that I use to describe the font used.


Class names tend to be more useful if they describe what the element
is rather than how it's styled. After all one of the benefits of CSS
is the ease in which the styling can be changed - and it makes no
sense to wither (a) change all the class values to match the new
styling or (b) keep the old class name which is no longer accurate.

Anyway, is your content naturally one paragraph on many paragraphs?
Answer that and you know which is the correct markup. Unless you show
us the actual content we can't tell you.

Steve


Kris 12-20-2004 09:00 PM

Re: Which is the proper way?
 
In article
<xsj68b3bld86.dlg@P7Ax8zefAz8re8ranuGa9rebruMUdruP HeYaPrabru9haSE5r56reT
hufrufRu4p.org>,
paul j <redsoxnut@remove.gmail.com> wrote:

> > You did say "list".
> >
> > <ul>
> > <li>Item A</li>
> > <li>Item B</li>
> > <li>Item C</li>
> > </ul>

>
> Let's say I don't want it in an ordered or unordered list.


Then use CSS to make the bullet/number dissapear.

ul, li {
margin-left: 0; padding-left: 0; list-style-type: none;
}

Whatever you want to make it look like, if it is a list, then it is a
list.

--
Kris
<kristiaan@xs4all.netherlands> (nl)

Uncle Pirate 12-20-2004 09:01 PM

Re: Which is the proper way?
 
paul j wrote:

> On Mon, 20 Dec 2004 15:40:45 -0500, Beauregard T. Shagnasty wrote:
>
>
>>paul j wrote:
>>
>>>I've heard it said that one should avoid excessive "<br />"'s

>>
>>True enough.
>>
>>
>>>So if I have a list of things what is the proper way to code it:
>>>
>>><p class="list">Item A</p>
>>><p class="list">Item B</p>
>>><p class="list">Item C</p>
>>>
>>>OR:
>>>
>>><p class="list">Item A<br />
>>>Item B<br />
>>>Item C<br /></p>

>>
>>You did say "list".
>>
>><ul>
>><li>Item A</li>
>><li>Item B</li>
>><li>Item C</li>
>></ul>

>
>
> Let's say I don't want it in an ordered or unordered list.


You mean it's not a list? If it is a list, why would you not want to
code it as a list? If it's just those pesky numbers or dots next to it,
they are easily removed using CSS.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
Cooordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked) :( http://motorcyclefun.org/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein


All times are GMT. The time now is 09:40 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.