The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Web Programming, Web 2.0 and Mashups
.
google unix.com



Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Insert Tabs / Indent text Tonda Shell Programming and Scripting 8 03-03-2009 03:08 AM
Converting a text file to HTML ph0enix Shell Programming and Scripting 4 10-29-2008 07:58 PM
How do I extract text only from html file without HTML tag los111 UNIX for Dummies Questions & Answers 4 11-28-2007 04:40 AM
coverting html data to text in 'c' phani_sree High Level Programming 3 10-18-2007 11:06 AM
html - text file question frustrated1 Shell Programming and Scripting 5 09-21-2005 06:23 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-03-2009
vanitham vanitham is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 56
How to indent the second line of text in html?

Hi,

I have 3 lines in a text and i want to indent the 2nd line of the text. How can i do that in html?

Here is the text.

Code:
1: XYZ. 2009 Jul 14.

Perl is a scripting language. Perl is a high-level, general-purpose, interpreted, dynamic programming language

ID: 2547999
The output should be:

Code:

1: XYZ. 2009 Jul 14.

    Perl is a scripting language. Perl is a high-level, general-purpose, dynamic  
    programming language

ID: 2547999
How to indent this 2nd line?

Any idea???

Regards
Vanitha
  #2 (permalink)  
Old 08-10-2009
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,323
It depends on how exactly you print the second line. Do you want tab or 4/8 spaces ? If you can use that in the print function, for example :
Code:
[root@server:~]$ perl -e 'print "\ttest\n"';
        test
[root@server:~]$
Notice the tab space before the test string. You can also grab the whole text and put in into EOF, as in :
Code:
print <<EOM;

test
     test
test

EOM
This will print the data exactly in the way you have formatted it.
For more advanced tasks you can use perltidy.
HTH.
Update : Oh, I just saw the post was one week old, I hope it's not too late.

Last edited by sysgate; 08-10-2009 at 05:26 AM.. Reason: more info
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0