Basic HTML

Discussions75 Books Challenge for 2010

Rejoignez LibraryThing pour poster.

Basic HTML

Ce sujet est actuellement indiqué comme "en sommeil"—le dernier message date de plus de 90 jours. Vous pouvez le réveiller en postant une réponse.

1TadAD
Jan 2, 2010, 12:39 pm

Since I don't want my thread becoming about HTML instead of books (*smile*), I'm copying this stuff over to here.

2TadAD
Jan 2, 2010, 12:40 pm

To put a book cover (or any image) in your post

The format you want to type looks like the following.

<img width="XXX" src="YYY">

Replace "XXX" with the width, in pixels, that you want your image. This allows you to scale down big images that might, otherwise, really mess up the layout of a posts. It doesn't matter how big the image is really, that tag will cause it to scale. As an example, the cover above is set to width="150".

Replace "YYY" with the URL (address) of the image you want to use. You can get a cover image off of the book's page. If you use the ones from LT, they sometimes disappear. If you choose one from down in the Amazon section, those are stable. Select the image and:

- if you use Firefox, right click and select "Copy Image Location"
- if you use Chrome, right click and select "Copy Image URL"
- if you use Safari, right click and select "Copy Image Address"
- if you use IE, right click and select "Properties" then select the address field

The result will look something like:

<img width="150" src="http://images.amazon.com/images/P/1558615105.01._SY190_SCLZZZZZZZ_.jpg">

3TadAD
Modifié : Fév 21, 2010, 9:33 am

To put a link to a thread (or any Web page) in your post

The format you want to type looks like the following.

<a href="XXX">Your text here</a>

Replace "XXX" with the URL (address) of the thread or Web site you want.

The result will look something like:

My thread can be found <a href="http://www.librarything.com/topic/80260">here</a>

Which comes out as:

My thread can be found here

You can also use an <img> tag at the location of the "Your text here" if you want to make an image link to a URL.

4TadAD
Modifié : Jan 2, 2010, 12:48 pm

To put a link to a specific message in your post

Use the basic format of putting a link to a full page found in the post above.

However, after the URL (address), you want to put a # sign and then the number of the post. It will look something like this:

<a href="http://www.librarything.com/topic/80260#1689433">Your text here</a>

How do you get the message number? Well, right click on the part of the message title that says "Message XX" and:

- if you use Firefox select "Copy Link Location"
- if you use Chrome select "Copy link address"
- if you use Safari select "Copy Link"
- if you use IE select "Copy shortcut"

5cameling
Jan 2, 2010, 12:45 pm

Useful thread .. you can bet I'll be coming over here often. How kind of you to start this, Tad. And clever too because you're right .... I could have started a whole slew of questions from other LTers turning your challenge thread into an online HTML class.

where was it that I read something along the lines that all it takes is a single flake to start an avalanche of destruction.... ;-)

6TadAD
Modifié : Jan 2, 2010, 12:51 pm

To change the look of the font

<b>your text here</b> makes something bold
<i>your text here</i> makes something italic
<u>your text here</u> makes something underlined
<strike>your text here</strike> make something struck through

7TadAD
Modifié : Jan 2, 2010, 12:53 pm

To put a lengthy quote in your post

The format you want is:

<blockquote>Your quote here</blockquote>

Which would look something like:

When in the Course of human events it becomes necessary for one people to dissolve the political bands which have connected them with another and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.

8TadAD
Modifié : Jan 2, 2010, 1:00 pm

To kill unclosed italics, bolds, etc.

Since you can't edit someone else's posts, how do you close their unclosed italics that are affecting everything that follows? Basically, start a new post and spam closing tags in. Something like:

</i></i></i></i>

Don't worry about having too many...it doesn't hurt when it's a closing tag.

Sometimes you do this and it has no effect. This is because people will sometimes use alternate tags for changing text and you must close with the exact same tag as opened the block. So, if </i> doesn't close italics, try </em>. If </b> doesn't close bold, try </strong>. Etc.

9TadAD
Jan 2, 2010, 12:59 pm

Ce message a été supprimé par son auteur

10Whisper1
Modifié : Jan 2, 2010, 3:17 pm

message #5

I fear I've added many flakes to the avalanche.

Tad,

Thanks for posting this thread. I deeply appreciate you!

11elliepotten
Jan 3, 2010, 5:00 pm

OK, I could kiss you right now - for the first time EVER I have finally managed to add a book cover to a post! It's been nearly two years with no luck, I'm starring you for future reference!

12kidzdoc
Jan 3, 2010, 5:18 pm

Thanks again for your HTML tutorials, Tad. I first learned HTML from your thread last year, and I used your tip in message 2 to adjust the size of the images I posted earlier today.

13jadebird
Jan 3, 2010, 9:23 pm

Thanks, Tad.

14ffortsa
Jan 5, 2010, 9:42 am

Tad, this is great! I'm a computer professional, but on the big machine side, and never got html in my head. This is SO helpful.

15TadAD
Jan 5, 2010, 11:03 am

Other characters

Ok, to answer the PMs about how did I type HTML brackets in the posts without them being converted...for example, when I type <b>, why didn't it start bold text?

You need to use character entities a.k.a. escape sequences. Escape sequences are sets of characters that get translated into another character by the browser. So, instead of typing < to start an example, I typed &lt;. The ampersand + some characters + the semicolon is the standard format of escape sequences.

NB: The browser translates these characters when it brings them in. If you go back and edit your post, all those escape sequences will have been replaced and you will have to re-enter them.

Some escape sequences that are useful in LT:

< - &lt; (HTML opening character)
> - &gt; (HTML closing character)
[ - &#91; (Touchstone opening character)
] - &#93; (Touchstone closing character)

While I'm at it, foreign characters, or any character, can be entered this way using escape sequences of the format &#XXX; where 'XXX' is the numeric code of the character, e.g.: &#225; = á. However, it's much easier (if you're on Windows) to just bring up the character map application (Programs/Accessories/System Tools/Character Map) and select the characters you want into the clipboard.

16TadAD
Jan 5, 2010, 11:13 am

You're all welcome. It was really nothing.

17Whisper1
Jan 5, 2010, 12:24 pm

18jasmyn9
Jan 6, 2010, 5:35 pm

Is there a way we can add a star to this thread title so it sorts near the top?

19alcottacre
Jan 6, 2010, 6:06 pm

#18: Jasmyn, you might drop a PM to Jim and ask him to put it into the group's introductory paragraph, just like the Kitchen and other useful threads are, and that way you can find it there. I do not know a way of altering the thread's title itself, but then, I do not know a whole lot about such things.

20drneutron
Jan 6, 2010, 7:24 pm

Done.

21alcottacre
Jan 6, 2010, 9:38 pm

Thanks, Jim!

22jasmyn9
Jan 7, 2010, 11:25 am

Yay! Thank you. I hadn't had a chance to really read and play around with the instructions and I was afraid I was going to lose the thread down the list somewhere.

23Cait86
Jan 9, 2010, 1:40 pm

Tad, thanks so much for this! I just have a question: I posted an image on my thread. After pressing "Enter" on my keyboard twice, I then typed in the title of the movie I was reviewing. For some reason, the title won't move below the image; instead, it is right next to it.

How can I move it down a few lines?

Thanks!

24TadAD
Jan 9, 2010, 2:03 pm

>23 Cait86::

This is something that has "broken" in LT since last year...they recognize carriage returns after text, but not after images. Not sure if it's permanent or a temporary thing.

Here's what you do...instead of ENTER, type <br>. This inserts a hard carriage return.

25Cait86
Jan 9, 2010, 2:05 pm

Success! Thanks :)

26Whisper1
Jan 11, 2010, 1:08 pm

Thanks Tad! I was going batty trying to figure out why the carriage return didn't work when I posted an image!

27cameling
Jan 11, 2010, 5:26 pm

Tad, how do you post a photograph onto a thread if the photograph is in your folder and doesn't have a URL?

28TadAD
Jan 11, 2010, 6:13 pm

>27 cameling:: ...in your folder...

If, by this, you mean on your local drive? You don't.

You need it up on the Web. There are a lot of sites that will allow you to host pictures for free. I use PhotoBucket, but any that allow you to reference the picture directly will do.

29MoonshineMax
Jan 12, 2010, 6:15 pm

Is there any way of fixing broken touchstones such as Ursula K. Le Guin and Ken Kesey, without resorting to links to the relevant page?

30TadAD
Jan 13, 2010, 9:32 am

Not that I know of

31Sundry
Modifié : Jan 13, 2010, 11:33 am

Thank you for posting this info!

Sometimes when I post a link to a book, the link is underlined; sometimes it isn't. I'm not familiar enough with posting links to understand why this happens.

32bonniebooks
Jan 18, 2010, 12:59 am

>31 Sundry:: I want to know the answer to that too!

33teelgee
Modifié : Jan 18, 2010, 1:25 am

I think it's random, there doesn't seem to be any rhyme or reason - or any difference, other than the line. You see the same thing with links to members' names, some underlined, some not.

ETA
OK, here's one thing: a lot of the member names on this page were underlined. The ones that weren't were members I've never clicked on for their profile page. When I came back here after visiting their page, their names were underlined. Nothing profound or very useful, really.

34bonniebooks
Jan 18, 2010, 1:51 am

I thought maybe it might be titles I've clicked on, but then every book I've listed on my threads should be underlined, but they're not so...?

35teelgee
Jan 18, 2010, 3:01 am

My guess is if you click on one of the non underlined ones now and then go back and refresh the page, it will be. Also, notice that when you put your cursor over a link that isn't underlined, it becomes underlined - coding for the "active link".

36Sundry
Jan 18, 2010, 9:47 am

> 33 & 35

Thanks! I thought I might have done something wrong when posting the links. As long as the links work...

37brenzi
Jan 18, 2010, 9:00 pm

>33 teelgee: and 35 Terri you're brilliant! That's so interesting.

38Apolline
Fév 15, 2010, 3:52 pm

Can anyone help me? The following line shows up on top of every thread I open, and it has a red script. I'm not sure what it means, but I wouldn't dare click on the link. Any tips?

Warning: Invalid argument supplied for foreach() in /var/www/html/inc_shortcuts.php on line 1708

I'm not spamming, at least not on purpose. Please let me know what I can do.

39TadAD
Fév 15, 2010, 4:06 pm

It looks like a debugging message from LT's PHP scripts. I'd report it to Tim in the Bug Collectors forum.

40tloeffler
Fév 15, 2010, 4:21 pm

Same thing is happening to me. You're not alone!

41Apolline
Fév 15, 2010, 4:29 pm

Okey, thanx. Good to know it's not just me.

42tjblue
Fév 15, 2010, 5:07 pm

Me too.

43FAMeulstee
Fév 15, 2010, 6:24 pm

I had it too, but it is gone now :-)

44BookAngel_a
Modifié : Mar 29, 2010, 1:13 pm

I'm posting this here so I can find it...

To post a poll on a thread, use this example:

(vote) Should Wives and Daughters count for opposites? (/vote)

Change the brackets to the pointy ones!

45flissp
Juin 18, 2010, 11:54 am

Does anyone know of any free websites similar to Ticker Factory for graphs & charts?

46lauralkeet
Juin 18, 2010, 1:06 pm

>45 flissp:: Google Docs includes an Excel-like spreadsheet capability, including graphs. And a PowerPoint-like chart application as well. Is that what you're looking for?

47flissp
Juin 18, 2010, 1:35 pm

Thanks, no, not really - I'd like something where I can create a pie chart or a graph and some html would be pumped back at me to reference it (as with the tickers) so that I can cut & paste it.

It was just a thought - I suppose the alternative is to create the chart normally then just convert it into a jpg - I don't know why I didn't think of that in the first place...

Thanks anyway!

48lauralkeet
Juin 18, 2010, 2:48 pm

>47 flissp:: where I can create a pie chart or a graph and some html would be pumped back at me to reference it
Ah, but you can do that in Google Docs. If you create a spreadsheet and a graph within that sheet, you can share just the graph. Google will give you the HTML code to use e.g., to paste into an LT talk message. et voila:



(I added a height qualifier to the html code Google provides)

49TadAD
Modifié : Juin 18, 2010, 2:56 pm

>45 flissp:: Well, Google Docs will do it, as will Chartle. The latter's charts aren't particularly sophisticated, but you can create it, "share" it (i.e., save it), then post a link to it.

www.chartle.net

ETA: Oh, I see Laura already gave you the Google Docs info while I was typing. :-)

50valerette
Juil 1, 2010, 10:16 am

I don't know if this is the right place to ask, but does anyone know of a way to make a spoiler-type button, if I want to talk about a book with spoilers but want to give people the choice to click something in my message and then the spoiler would open? I've seen this on other message boards but I don't know if it's possible here.

51flissp
Modifié : Juil 1, 2010, 10:59 am

Oooh, I never said thanks for the advice people!

#50 valerette, what quite a lot of people do is put a boldface spoiler warning just before the spoiler bit, then use strikethrough for the spoiler text - it leads your eye away and makes the text easy not to read (boldface and strikethrough instructions here)

...on the other hand, what you ask would be even better if anyone does know how...

52TadAD
Juil 2, 2010, 11:27 pm

Short of putting your abridged comments in the post and a link to a full review in your library, I would be surprised if you can do this. LibraryThing suppresses almost all HTML in the forums, so not much can be done.

53TadAD
Nov 5, 2010, 7:29 am

Just bumping this because so many people saying they don't know how to do images.

54SqueakyChu
Nov 5, 2010, 11:46 am

You read my mind, Tad. I was hoping to once again find the code for the pointy brackets. Thanks!

55richardderus
Déc 2, 2010, 3:41 pm

Why am I having such a bear of a time getting an image in my junk drawer to post to a thread?!?

56LauraBrook
Déc 2, 2010, 6:49 pm

So glad I stumbled across this thread ... several messages are now starred for future reference. Thanks for setting this up, Tad!

57TadAD
Modifié : Déc 3, 2010, 9:18 am

>55 richardderus:: I don't have a problem doing it, Richard, as demonstrated by this lovely scene of Beijing Street Meat.

58richardderus
Déc 3, 2010, 10:56 am

Stephen/Ape enlightened me...I was copying a carriage return and that screwed things up. How he figured that out I will never know...frankly, don't care either...but I'm more careful to copy ONLY the URL and not a space after it.

59TadAD
Déc 3, 2010, 10:58 am

>58 richardderus:: If you ever want to figure it out, you can look at the HTML for a page that trying to render. All the major browsers have a menu choice named something like "View Source". Then you can see the actual stuff being emitted and look for things like carriage returns where they shouldn't be or missing quotes.

60lyzard
Déc 4, 2010, 2:46 am

Hi, could someone talk me through the procedure for adding a ticker counter to a thread? Which is the correct code to use, and how should it be inserted? Thanks.

61alcottacre
Déc 4, 2010, 2:48 am

#60: Most of us use tickers from www.thetickerfactory.com, a website that really walks you through the process, allowing you to set up the ticker the way you like it, and then providing the HTML code to insert into your thread.

Hope that helps!

62lyzard
Déc 4, 2010, 2:51 am

I wasn't sure if it was the HTML code I was supposed to be using - I know that Ticker offer several different sorts of code for different supports, including one that looks like it's for message-boards.

63alcottacre
Déc 4, 2010, 2:55 am

#62: Yes, you want the HTML code. When you reach the last page, having picked out how you want your ticker to look, there will be both BBCode and HTML codes to copy. You want the HTML.

64lyzard
Déc 4, 2010, 3:05 am

Thanks!

65alcottacre
Déc 4, 2010, 3:08 am

#64: No problem! Glad I could help.

66elliepotten
Déc 2, 2011, 10:06 am

Boosting this thread out of dormancy again, just because I like it better than this year's version...

67maggie1944
Déc 4, 2011, 8:34 am

good idea!