By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,447 Members | 1,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,447 IT Pros & Developers. It's quick & easy.

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

P: n/a
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;&nb sp;" ?

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

Wladi

Jul 20 '05 #1
Share this Question
Share on Google+
21 Replies


P: n/a
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.
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/>
Jul 20 '05 #2

P: n/a
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.
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;&nb sp;" ?

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...
-::- ((.*
Jul 20 '05 #3

P: n/a
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
Jul 20 '05 #4

P: n/a
On Sun, 2 May 2004 21:57:40 +0200, wl*******@gmx.net (Wladimir Borsov)
declared in alt.html,comp.infosystems.www.authoring.html:
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
Jul 20 '05 #5

P: n/a
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.


<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

Jul 20 '05 #6

P: n/a
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.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #7

P: n/a
Brian wrote:
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

Jul 20 '05 #8

P: n/a
Eric Bustad <ek******@monmouth.com> wrote:
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

Jul 20 '05 #9

P: n/a
On Sun, 2 May 2004, Eric Bustad wrote:
Naive question: What's wrong with <blockquote>?


Naive answer: What's wrong with learning HTML for logical markup, and
CSS for presentation?

Jul 20 '05 #10

P: n/a
Eric Bustad wrote:
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
Jul 20 '05 #11

P: n/a
Tim
Eric Bustad wrote:
Naive question: What's wrong with <blockquote>?


"Shawn K. Quinn" <sk*****@xevious.kicks-ass.net> posted:
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.


Not to mention that some browsers don't even indent blockquoted data (they
don't have to do that, there's no requirement that blockquoted text is
indented, it's merely a common practice). One of my browsers just
italicises blockquotes.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #12

P: n/a
Folks,

<p>-tag is one of the possibilities. You can also use
the <blockquote>-tag.
See code:
----------------------

<html>
<head></head>

<body>
normal

<blockquote>
this whole text is indented.<br>
the quick brown fox jumps over the lazy dog.<br>
thiss sentencee contains three errors.<br>
<blockquote>
you can even nest the blockquote tag.<br>

</blockquote>
so you have multiple paragraphs.
</blockquote>
</body>
</html>

----------------------

Make your choice. <p> or <blockquote> ;-))

Raymond.
i: http://www.raymondloman.nl
e: no****@raymondloman.nl

Toby A Inkster <to*****@goddamn.co.uk> wrote in message news:<pa****************************@goddamn.co.uk >...
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.


<p style="margin-left:4em">This paragraph is indented.</p>

Jul 20 '05 #13

P: n/a
On 4 May 2004 00:00:35 -0700, ra*****@raymondloman.nl (Raymond Loman)
declared in comp.infosystems.www.authoring.html,alt.html:
Make your choice. <p> or <blockquote> ;-))


If it's a paragraph, use <p>. If it is a block quote, use <blockquote>.
If it is a paragraph that you want indented, use <p> with appropriate
CSS, as per Toby's post.

BTW: Please don't post upside-down.
http://www.allmyfaqs.com/faq.pl?How_to_post

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 20 '05 #14

P: n/a
Raymond Loman wrote:
<p>-tag is one of the possibilities. You can also use
the <blockquote>-tag.


Blockquote is good, but only appropriate if the text you're marking up is
a genuine quotation from some external source.

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

Jul 20 '05 #15

P: n/a

"Raymond Loman" <ra*****@raymondloman.nl> wrote in message
news:b0**************************@posting.google.c om...
Folks,

<p>-tag is one of the possibilities. You can also use
the <blockquote>-tag.


Please don't give any more advice regarding HTML

-Karl
Jul 20 '05 #16

P: n/a
A: Top posting.
Q: What is the most annoying thing on Usenet?

Raymond Loman wrote:
Folks,

<p>-tag is one of the possibilities. You can also use
the <blockquote>-tag.


The rendering of BLOCKQUOTE is not even guaranteed to be indentation, and I
don't know how you figure P will usually render indented (unless I am
missing something, it won't).

Again, it's fine to use BLOCKQUOTE for a block quotation, but it's not an
"indent command".

[upside-down fullquote snipped]

--
Shawn K. Quinn
Jul 20 '05 #17

P: n/a
Shawn K. Quinn wrote:
A: Top posting.
Q: What is the most annoying thing on Usenet?

Raymond Loman wrote:
Didn't I post the right way? Probably I am pretty new here, so
please instruct me how I should post on the Usenet. I try to avoid
top-posting.

The questioner was looking for an answer, not for ethics.
I quess he was helped.

Raymond.

Folks,

<p>-tag is one of the possibilities. You can also use
the <blockquote>-tag.

The rendering of BLOCKQUOTE is not even guaranteed to be indentation, and I
don't know how you figure P will usually render indented (unless I am
missing something, it won't).

Again, it's fine to use BLOCKQUOTE for a block quotation, but it's not an
"indent command".

[upside-down fullquote snipped]

Jul 20 '05 #18

P: n/a
Raymond Loman wrote:
Shawn K. Quinn wrote:
A: Top posting.
Q: What is the most annoying thing on Usenet?

Raymond Loman wrote:
Didn't I post the right way?


This time, you did, sorta. You replied below the part that you quoted.
But you also left the rest of the quoted message below your reply. This
is merely wasted bandwidth. That part you should have trimmed.
Probably I am pretty new here, so please instruct me how I should
post on the Usenet.


http://allmyfaqs.com/faq.pl?How_to_post

Lots of useful material here, too:
http://www.cs.tut.fi/~jkorpela/usenet/
[upside-down fullquote snipped]


....again!

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #19

P: n/a
"Karl Groves" <ka**@NOSPAMkarlcore.com> wrote in message news:<c7**********@ngspool-d02.news.aol.com>...
"Raymond Loman" <ra*****@raymondloman.nl> wrote in message
news:b0**************************@posting.google.c om...
Folks,

<p>-tag is one of the possibilities. You can also use
the <blockquote>-tag.


Please don't give any more advice regarding HTML

-Karl


Thanx for your advice.

-Raymond.
Jul 20 '05 #20

P: n/a
/Raymond Loman/:
The questioner was looking for an answer, not for ethics.
I quess he was helped.


The Usenet is not a personal help desk for every questioner and this
thread is meant help many others (not just him) - at this moment,
and at later time through archives. So the ethics and the written
format are of the most important things here.

--
Stanimir
Jul 20 '05 #21

P: n/a
Raymond Loman wrote:
Shawn K. Quinn wrote:
A: Top posting.
Q: What is the most annoying thing on Usenet?

Raymond Loman wrote:
Didn't I post the right way?


No, you put your response before the quote of my original message, which is
wrong (it should go after).
The questioner was looking for an answer, not for ethics.
I quess he was helped.


That was a pretty piss poor "answer" you gave, which was wrong on several
levels. I posted a correction in response, not "ethics".

--
Shawn K. Quinn
Jul 20 '05 #22

This discussion thread is closed

Replies have been disabled for this discussion.