HighDots Forums  

How to indent a normal or a <PRE>....</PRE> text in HTML?

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss How to indent a normal or a <PRE>....</PRE> text in HTML? in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wladimir Borsov
 
Posts: n/a

Default How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-02-2004 , 03:57 PM






Assume I want to publish a longer article on a web page.
One of the paragraphs I want to display with an indent.
Read: All text lines of this paragraph should be displayed with (let's say 8) blanks
from the "normal" left side.

How do I do that without coding "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ?

Is there something like
<TAB size=8> ..... </TAB> ?

Wladi


Reply With Quote
  #2  
Old   
David Dorward
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-02-2004 , 03:58 PM






Wladimir Borsov wrote:

Quote:
Assume I want to publish a longer article on a web page.
One of the paragraphs I want to display with an indent.
Read: All text lines of this paragraph should be displayed with (let's say
8) blanks from the "normal" left side.
some selector {
margin-left: 8ex;
}

http://dorward.me.uk/www/css/#tutorials if that doesn't make sense.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>


Reply With Quote
  #3  
Old   
Sieue
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-02-2004 , 04:17 PM



Wladimir Borsov wrote:
Quote:
Assume I want to publish a longer article on a web page.
One of the paragraphs I want to display with an indent.
Read: All text lines of this paragraph should be displayed with
(let's say 8) blanks from the "normal" left side.

How do I do that without coding
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" ?

Is there something like
TAB size=8> ..... </TAB> ?

Wladi
Define a new div in your CSS and set the left and right margins to be 8em
wider than the margins of your main content div or <p>?

--
Sue H

*..· ´¨¨)) -:¦:-
¸.·´ .·´¨¨))
((¸¸.·´ .·´ -:¦:- Let there be goats...
-:¦:- ((¸¸.·´*




Reply With Quote
  #4  
Old   
Frank
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-02-2004 , 04:44 PM



Hi!

If you use CSS you can create a paragraph-class like this (Code not
tested!!):

p.yourparagraphname
{
text-indent: 1cm;
}


then:

<p class="yourparagraphname">
ajaj ajajaj aj aj aj aj
</p>


Frank



Reply With Quote
  #5  
Old   
Toby A Inkster
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-02-2004 , 06:07 PM



Wladimir Borsov wrote:

Quote:
Assume I want to publish a longer article on a web page.
One of the paragraphs I want to display with an indent.
<p style="margin-left:4em">This paragraph is indented.</p>

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132



Reply With Quote
  #6  
Old   
Mark Parnell
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-02-2004 , 06:41 PM



On Sun, 2 May 2004 21:57:40 +0200, wladimirb (AT) gmx (DOT) net (Wladimir Borsov)
declared in alt.html,comp.infosystems.www.authoring.html:

Quote:
One of the paragraphs I want to display with an indent.
..indent {padding-left: 6em;} /* flavour to taste */

<p class="indent">Indented text here...</p>

--
Mark Parnell
http://www.clarkecomputers.com.au


Reply With Quote
  #7  
Old   
Eric Bustad
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-03-2004 , 01:30 AM



Brian wrote:

Quote:
Wladimir Borsov wrote:

Assume I want to publish a longer article on a web page. One of the
paragraphs I want to display with an indent.

Why do you want to indent it? (Is it a long quotation?)

Read: All text lines of this paragraph should be displayed with
(let's say 8) blanks from the "normal" left side.

The css solutions already proposed will work -- assuming a css capable
browser, of couse.
Naive question: What's wrong with <blockquote>?

= Eric



Reply With Quote
  #8  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-03-2004 , 03:19 AM



Eric Bustad <ekbustad (AT) monmouth (DOT) com> wrote:

Quote:
Naive question: What's wrong with <blockquote>?
Nothing, if and only if the answer to the question "(Is it a long
quotation?)" is "yes". Consult the definition of <blockquote> in the HTML
specification, if this is not clear.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html



Reply With Quote
  #9  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-03-2004 , 04:30 AM



On Sun, 2 May 2004, Eric Bustad wrote:

Quote:
Naive question: What's wrong with <blockquote>?
Naive answer: What's wrong with learning HTML for logical markup, and
CSS for presentation?



Reply With Quote
  #10  
Old   
Shawn K. Quinn
 
Posts: n/a

Default Re: How to indent a normal or a <PRE>....</PRE> text in HTML? - 05-03-2004 , 05:29 AM



Eric Bustad wrote:

Quote:
Brian wrote:

Wladimir Borsov wrote:
Read: All text lines of this paragraph should be displayed with
(let's say 8) blanks from the "normal" left side.

The css solutions already proposed will work -- assuming a css capable
browser, of couse.

Naive question: What's wrong with <blockquote>?
If it's a block quotation, none at all. If it's not a block quotation, then
everything.

The element name is BLOCKQUOTE. It is not INDENT. In fact, the abuse of the
BLOCKQUOTE element to indent text is explicitly deprecated in HTML 4.0.

--
Shawn K. Quinn


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.