Welcome to WebmasterWorld Guest from 54.144.79.200

Forum Moderators: incrediBILL

Message Too Old, No Replies

<title> tag

line breaks?

     

ctoz

12:08 am on Feb 19, 2013 (gmt 0)

5+ Year Member



I'm going to be using some software that displays am image's title tag below the image.

Is there a way of putting a line-break into the title text?
Maybe it's not an html question?

tedster

5:34 am on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I think you're talking about a title attribute- (img="a.jpg" title="lore ipsum") - rather than a <title> tag, right?

lucy24

5:49 am on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



overlapping tedster

Whew. I thought you were asking about the <title> of a page, and was all set to scream that you CAN'T have line breaks in a page title :)

s there a way of putting a line-break into the title text?

In theory yes. In practice ... uh ... depends on the whim of the browser. All my current browsers will interpret a physical linebreak inside the title attribute's quotation marks as a physical linebreak in the displayed title. But I'm not positive browsers are really supposed to do this.

birdbrain

8:59 am on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there ctoz,

I use the HTML character code for a carriage return...


&#13;



title="Web&#13;Master&#13;World"



It works nicely in this selection of browsers at least...
  1. IE9
  2. Firefox 18.0.2
  3. Opera 12.14
  4. Safari 5.1.7
  5. Chrome 24.0.1312.52


birdbrain

lucy24

12:10 pm on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



I'll be darned.

To test:

<p>CR alone <span title = "line&#13;break&#13;here">like this</span>.</p>

<p>LF alone <span title = "line&#10;break&#10;here">like this</span>.</p>

<p>CRLF <span title = "line&#13;&#10;break&#13;&#10;here">like this</span>.</p>


All three come out the same on current Mac versions of Safari, FF, Chrome and Opera.

Would anyone care to speculate about why the &#10; version (LF alone) is read by MSIE 5.23 as no whitespace and then one whitespace, while the CRLF version (&#13;&#10;) comes through as one whitespace and then two whitespaces? CR alone &#13; --the Mac Classic line break-- is recognized as a single white space each time.

Go figure.

Come to think of it, the entities should work exactly the same as literal line breaks shouldn't they.

rainborick

1:25 pm on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It probably traces back to the historic difference in the text file formats between UNIX/Linux/Mac and DOS/Windows, one way or the other.

StoutFiles

1:57 pm on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Don't look for it Lucy! You may not like what you find.

swa66

4:25 pm on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



MSIE 5.23

Dead and buried that version, even forgotten long ago.
Actually a good thing IMHO.

Fotiman

5:13 pm on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



MSIE 5.23?! What the?!

As of October of 2008 (4 years and 4 months ago), IE 5.5 had 0.05% market share. IE < 5.5 had already fallen off the radar, and this was the last month that stats were presented for IE 5.5 on [gs.statcounter.com...]

Dead and buried is an understatement.

swa66

9:24 pm on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



IE 5.23 is a mac version, actually the last MSFT ever distributed - it's a piece of utter junk IMHO.

It's compiled for the PowerPC architecture, so you need an emulator like rosetta to run it on modern mac hardware. Rosetta itself was discontinued as well (not installed by default under snow leopard (10.6), not supported anymore on Lion (10.7) and Mountain Lion (10.8)) Rosetta was a way to facilitate the transition of the PowerPC architecture to the Intel based one for Tiger (10.4) and Leopard (10.5) - a rather painless transition to those who used rosetta (even unknowingly sometimes).

If anybody wants it: archive.org has a copy of IE 5.23. But seriously: forget about it. This IE is much, much worse than any other IE version you might ever run into. It had it's very own special set of IE bugs ("features" as MSFT only fixed security bugs or legal problems in IE.)

lucy24

11:25 pm on Feb 19, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



Fer hevvins sake, people. I don't use MSIE 5.23. In fact I was staggered to find it still works on my current Mac (10.6.8, the last version that came with Rosetta-- and that's after bidding a tearful farewell to 10.4, the last version to permit Classic). I just fire it up now and then for experimental purposes. I sometimes run Lynx for the same reason.

Some of you may be too young to remember, but for years and years-- decades even-- one of the beauties of the Mac was that you could continue running positively ancient applications. Not like That Other Platform where you basically had to upgrade all your software every time you moved to a new operating system. To this day I haven't found a diff-merge program that works as well as the one dating from 1991 that I used to use. And I've never managed to replace the whole array of font-wrangling programs I used to have.

What was the question again?

Oh, right. Line breaks inside quotation marks, as in "title" or "alt" attributes. Basically anything inside quotes is treated as literal text.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month