LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-13-2014, 04:59 PM   #1
stateless
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 166
Blog Entries: 1

Rep: Reputation: 4
html: line continuation for strings


In HTML, if you have a really long string, is there a way to break it up into separate lines and keep it as one string? I want to have my HTML code within 80 character width. E.g.:

Code:
<a href="www.example.com/blahblahblahblah/somethingorother/really/long/url/path/goes/here/and/is/way/too/long/index.html">title</a>
Would become

Code:
<a href="www.example.com/blahblahblahblah/somethingorother/really/long/url/\
         path/goes/here/and/is/way/too/long/index.html">title</a>
But I tried that (and some variations) and it didn't work.
 
Old 02-13-2014, 05:14 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Did you try without the spaces (or tab) in front of path?

jlinkels
 
Old 02-13-2014, 06:38 PM   #3
stateless
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 166

Original Poster
Blog Entries: 1

Rep: Reputation: 4
Quote:
Originally Posted by jlinkels View Post
Did you try without the spaces (or tab) in front of path?

jlinkels
Yeah, no luck.
 
Old 02-14-2014, 09:19 AM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,220

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by stateless View Post
In HTML, if you have a really long string, is there a way to break it up into separate lines and keep it as one string?
No.
 
1 members found this post helpful.
Old 02-16-2014, 01:39 AM   #5
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
I think simply hitting return in the text editor is all you need to do since the browser will render only tags like br, p-/p etc as new lines. So to the human (you) it is readable and as you would expect, it makes no difference to the machine (browser).

Note

OK
 
Old 02-18-2014, 04:41 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Assuming dugan is right, there's nothing to stop you setting wrap as on in your editor; that way it appears ok to you (if not so nicely indented).
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Batch rename html files line by line from text file saturnianalien Linux - Newbie 3 01-30-2013 11:01 AM
sed one line extract between two strings on one line - several occurences Jykke Linux - Desktop 2 12-05-2012 09:08 AM
how to find continuation of line with PERL menylea Linux - Newbie 2 03-14-2012 01:51 AM
How to take the data from a strings in a file and output them as the HTML using perl vesskrishna Linux - Newbie 3 11-22-2011 03:20 AM
How to grep two strings in one line in a file? thomas2004ch Linux - Newbie 5 09-15-2009 04:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration