Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   how to make it break lines (http://www.velocityreviews.com/forums/t294202-how-to-make-it-break-lines.html)

DaVinci 05-20-2006 03:14 PM

how to make it break lines
 
consider the codes
<html>
first line: there are some messages
second line: another line
</html>

how to make the two lines information appear as two lines rather than
make the two line become only one line.

the webpages should looks like:
first line: there are some messages
second line: another line

the webpages should not looks like:


first line: there are some messages second line: another line



is there any simple way to do it ?


Jonathan N. Little 05-20-2006 03:39 PM

Re: how to make it break lines
 
DaVinci wrote:
> consider the codes
> <html>
> first line: there are some messages
> second line: another line
> </html>
>
> how to make the two lines information appear as two lines rather than
> make the two line become only one line.
>
> the webpages should looks like:
> first line: there are some messages
> second line: another line
>
> the webpages should not looks like:
>
>
> first line: there are some messages second line: another line
>
>
>
> is there any simple way to do it ?
>


In a document if your want to start a new line your create a new
paragraph, right? Well, same in HTML

<p>first line: there are some messages</p>
<p>second line: another line</p>

If both are contextually in the same paragraph but your require the
second part to be on another line, happens in poetry a lot then BR
(break line)

<p>first line: there are some messages<br><second line: another line</p>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Jukka K. Korpela 05-20-2006 07:35 PM

Re: how to make it break lines
 
Jonathan N. Little <lws4art@centralva.net> scripsit:

> In a document if your want to start a new line your create a new
> paragraph, right?


Nope.

> Well, same in HTML


Nope.

> <p>first line: there are some messages</p>
> <p>second line: another line</p>


In addition to being semantically wrong (a line does not normally constitute
a paragraph), this causes more than desired, such as vertical spacing in
graphic rendering.

> If both are contextually in the same paragraph but your require the
> second part to be on another line, happens in poetry a lot then BR
> (break line)
>
> <p>first line: there are some messages<br><second line: another
> line</p>


It still isn't a paragraph. Using <div> would be more appropriate. Moreover,
it's somewhat more logical and potentially more useful (especially in
styling) to wrap each line inside a <div> rather than use command-like
markup like <br>. That is,

<div>first line: there are some messages</div>
<div>second line: another line</div>


pecan 05-21-2006 08:13 AM

Re: how to make it break lines
 

"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote in message
news:obKbg.3064$my.2250@reader1.news.jippii.net...
> Jonathan N. Little <lws4art@centralva.net> scripsit:
>
> > In a document if your want to start a new line your create a new
> > paragraph, right?

>
> Nope.
>
> > Well, same in HTML

>
> Nope.
>
> > <p>first line: there are some messages</p>
> > <p>second line: another line</p>

>
> In addition to being semantically wrong (a line does not normally

constitute
> a paragraph), this causes more than desired, such as vertical spacing in
> graphic rendering.
>
> > If both are contextually in the same paragraph but your require the
> > second part to be on another line, happens in poetry a lot then BR
> > (break line)
> >
> > <p>first line: there are some messages<br><second line: another
> > line</p>

>
> It still isn't a paragraph. Using <div> would be more appropriate.

Moreover,
> it's somewhat more logical and potentially more useful (especially in
> styling) to wrap each line inside a <div> rather than use command-like
> markup like <br>. That is,
>
> <div>first line: there are some messages</div>
> <div>second line: another line</div>
>


Is there anything wrong with using <BR>? I use it a lot, since it gives a
different spacing to the </P><P>.

CM

--
==Not nuts, just a little eccentric==
African Bush Tours and Safaris
http://www.africanbush.co.za/




Jonathan N. Little 05-21-2006 01:12 PM

Re: how to make it break lines
 
pecan wrote:

> Is there anything wrong with using <BR>? I use it a lot, since it gives a
> different spacing to the </P><P>.


If they are separate paragraphs you should use <p>...</p><p>...</p>. If
you want to adjust the space between paragraphs then you should adjust
the margins via CSS:

P { margin: .25em; }

P { margin: 0 1em; }

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

pecan 05-21-2006 01:52 PM

Re: how to make it break lines
 
Jonathan N. Little wrote:
> pecan wrote:
>
>> Is there anything wrong with using <BR>? I use it a lot, since it
>> gives a
>> different spacing to the </P><P>.

>
> If they are separate paragraphs you should use <p>...</p><p>...</p>. If
> you want to adjust the space between paragraphs then you should adjust
> the margins via CSS:
>
> P { margin: .25em; }
>
> P { margin: 0 1em; }
>


They are separate paragraphs mostly, but sometimes I just want a
sentence on a new line. The spacing I'm talking about isn't the margin,
it's the line spacing.

CM

Jonathan N. Little 05-21-2006 04:09 PM

Re: how to make it break lines
 
pecan wrote:
> Jonathan N. Little wrote:
>> pecan wrote:
>>
>>> Is there anything wrong with using <BR>? I use it a lot, since it
>>> gives a
>>> different spacing to the </P><P>.

>>
>> If they are separate paragraphs you should use <p>...</p><p>...</p>.
>> If you want to adjust the space between paragraphs then you should
>> adjust the margins via CSS:
>>
>> P { margin: .25em; }
>>
>> P { margin: 0 1em; }
>>

>
> They are separate paragraphs mostly, but sometimes I just want a
> sentence on a new line. The spacing I'm talking about isn't the margin,
> it's the line spacing.


Well if they are separate paragraphs then as stated you should do as
above use <p>...</p><p>...</p>. If you do not want to compress all your
paragraphs then create a class

..compressed { margin: 0 1em; }

<p>Regular paragraph...</p>
<p class="compressed">Compressed spacing paragraph...</p>
<p class="compressed">Compressed spacing paragraph...</p>
....

If you just need to for a new line for a specific sentence the by all
means use a BR

<p>Regular paragraph...<br>but now on a new line</p>

If you need to separate a part of a paragraph with a special treatment
sort of like an inset then enclose in DIV seems to make sense to me.

..example { margin: 0 5em; color: red; }

<p>
Some technical treatise .... for example:
<div class="example">Your example...</div>
continuing rambling discourse ...
</p>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Jukka K. Korpela 05-21-2006 09:44 PM

Re: how to make it break lines
 
pecan <pecan.NOSPAM@iafrica.com> scripsit:

[a fullquote, always a useful signal of lack of comprehensive reading]

> Is there anything wrong with using <BR>?


Yes, since you had to ask.

> I use it a lot, since it
> gives a different spacing to the </P><P>.


Yes, you are definitely using it wrong. Try reading a primer on HTML that
explains the basic semantics of elements.



All times are GMT. The time now is 08:20 AM.

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