you're reading:
Comments, Html & inline css codes, Shortcodes, Videos

Comments: allowed HTML (2)

https://wpbtips.wordpress.com/

As shown in part 1 of this article, some themes display this as the html you are confined to when commenting:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i>
<q cite=""> <strike> <strong>

Explanation (for those not familiar with html)

All the above are opening tags: each one says “mark up the text from this point on”. Each one must always be paired with a corresponding closing tag (same tag but with a slash after the first bracket) that says “up to this point”.

<i>TEXT HERE</i>
<em>TEXT HERE</em>
Enclosed text will turn to italics.

<b>TEXT HERE</b>
<strong>TEXT HERE</strong>
Enclosed text will turn bold.

(Strictly speaking, “em” and “strong” mean emphasis and stronger emphasis, and can result in some other differentiation; in practice they almost invariably translate to italics and bold.)

<a href="">TEXT HERE</a>
Enclosed text will turn into a link to the address you put inside the quotes.
(The address must be the exact complete URL as copied from the address bar of your browser.)

<blockquote>TEXT HERE</blockquote>
<cite>TEXT HERE</cite>
<q>TEXT HERE</q>
Enclosed text is a quotation. The visual result varies, depending on the theme. Forget “q”, as it doesn’t work in Explorer.

<del>TEXT HERE</del>
<strike>TEXT HERE</strike>
Enclosed text will show up with a strikethrough line.

<pre>TEXT HERE</pre>
If you copy-paste some text from a text editor, enclosing it this way will preserve multiple spaces and line breaks.

<code>CODE HERE</code>
Displays computer code. Can’t be used to display html tags.

<abbr>WORD HERE</abbr>
<acronym>WORD HERE</acronym>
Enclosed word is an abbreviation or an acronym. No difference visually. Practically useless unless in conjunction with the title attribute.

title=""
Adding this to the opening tag of a link, an abbreviation or an acronym will make the text you put inside the quotes pop up upon hover over. For example, if you write this:
<a href="http://wpbtips.wordpress.com/2010/05/10/html-allowed-in-comments-1/" title="Html allowed in comments (1)">Click here for part 1 of this article</a>
the result will be this (place your cursor over the link and wait before clicking):
Click here for part 1 of this article
(And I would feel sorry for whomever uses this in a comment…)

cite=""
datetime=""
Adding these to an opening “del” tag is meant for recording why and when the text was struck through, i.e revised. Absolutely pointless in a comment, plus no major browser supports them.

Additional remarks

• These tags can have a combined effect; for example:

<b><i>This will be bold and italics</i></b>

This will be regular text, <b>this will be bold, <i>this will be bold and italics, </i>this will be bold only, </b>this regular again.

• All other html tags and attributes are stripped out. So, among other things, you cannot make any other changes to the style or the formatting of the text (e.g. size, color, or indenting), you cannot make a link open in a new window, and you cannot insert images.

On the other hand:

• Html entities (see Links 1 in my sidebar) can be used.

• You can use the source-code shortcode to display code (including html tags).

• If you paste a valid URL, it will automatically turn into a live link.

• If you paste the URL of a Youtube video in particular, the video itself will show up.

(To disable a Youtube video posted that way in your blog: Comments > Edit > highlight video URL > click code button > click Update.)

• Some video shortcodes work. (I haven’t tried them all; of those I have tried, flickr, ted, wpvideo, and youtube work, blip.tv, livevideo, and vimeo don’t.)

• The soundcloud and gigya shortcodes also work.

Endnote

Comments are basically dialogue; it’s not likely that you’ll ever need anything fancy or far-fetched in a comment. But anyway it should be clarified that all those html restrictions apply to commenting as a visitor: when commenting on your own blog, you can use all the html allowed in posts. Demo comment below.

https://wpbtips.wordpress.com/

Please don’t paste code in comments – see comment guidelines.

Discussion

54 thoughts on “Comments: allowed HTML (2)

  1. (Demo comment)

    Link that opens in a new window

    Indented text

    Centered text

    Larger size

    Different font

    Bordered text

    Colored text

    Text with bg color

    may i feel said he
    (i’ll squeal said she
    just once said he)
    it’s fun said she

    (may i touch said he
    how much said she
    a lot said he)
    why not said she

    (let’s go said he
    not too far said she
    what’s too far said he
    where you are said she)

    may i stay said he
    (which way said she
    like this said he
    if you kiss said she

    may i move said he
    is it love said she)
    if you’re willing said he
    (but you’re killing said she

    but it’s life said he
    but your wife said she
    now said he)
    ow said she

    (tiptop said he
    don’t stop said she
    oh no said he)
    go slow said she

    (cccome?said he
    ummm said she)
    you’re divine!said he
    (you are Mine said she)
     
    – E.E.Cummings

    Posted by Panos | May 23, 2010, 10:55
  2. ║=♮ ly ✁ , ∴ ☆ ☆ ☆!
    post is natural ly a cut above, therefore 3 stars!

    Two of my favorites in one comment: scrolling E. E. Cummings…
    inspired me to waste the morning online to read poetry. Though he misses a few words, I found this reading moving:

    http://video.google.com/videoplay?docid=-7504310398618671331#

    Andrew Bindon

    Posted by Tess | May 24, 2010, 20:01
  3. Thanks! (I’m sure you don’t mind my adding a couple of semi-colons etc…)

    Posted by Panos | May 25, 2010, 01:13
  4. ≥^;^≤
    ( ; ; \_____ good euphemism

    Posted by Tess | May 25, 2010, 16:50
  5. Well I said “etc”! (Leaving the other comments would spoil it, wouldn’t it?)

    Posted by Panos | May 26, 2010, 11:27
  6. blue

    Posted by Ropuia | May 28, 2010, 04:29
  7. Whatever…

    Posted by Panos | May 28, 2010, 05:11
  8. do you think Ropula is a krzysztof kieslowski fan there?

    my favorite is red (Trois Couleurs: Rouge) but for some reason i could find only a complete set of blue on YouTube a week or so ago….
    I have videos of the trilogy, but my VCR is long gone.

    have you seen those movies?
    If not, take a look. I’d be curious about what you think of them…

    Posted by Tess | May 28, 2010, 07:01
  9. I’d rather not say what I think Ropula is…

    No I haven’t seen those three. I had seen Veronica, wasn’t impressed, hated the music, lost interest in this director. Can’t guarantee I’ll take a look!

    (But Cummings is my favorite poet)

    Posted by Panos | May 28, 2010, 09:46
  10. Veronica did not impress me either. More tv than art—don’t remember exactly why anymore, though.
    I saw Red first. I’m always interested in how one can not know the first or last time a significant event happens. Things sometimes occur serendipitously, coincidentally, and / or unasked for. First, last—how do we know? Life goes on, we have the relationships, the moments are what we have… interwoven with the moments of other people.

    Red begins with a phone call (though not this one)…

    your little voice
     
                     Over the wires came leaping 
    and i felt suddenly 
dizzy
     
         With the jostling and shouting of merry flowers
    wee skipping high-heeled flames 
    courtesied before my eyes 
    
                                        or twinkling over to my side
     
Looked up 
    with impertinently exquisite faces 
    floating hands were laid upon me 

    I was whirled and tossed into delicious dancing
    up 

    Up
     
with the pale important
     
                                 stars and the Humorous 
    
                                                                     moon 
     dear girl 
 
    How i was crazy how i cried when i heard
     
                                                             over time 
    and tide and death 

    leaping
     
 Sweetly
     
          your voice

    Blue and White are like supporting plots to the themes of Red—characters and scenes from Red appearing in the background of the other two movies.

    (But Cummings is my favorite poet)

    I have thought about that poem for some time. Now I wonder if I’d have been better served in high school to have taken wood-shop, metal-shop, or auto-mechanics than English classes? Little did I know what I’ve been missing all these years! Thanks.

    Posted by Tess | May 29, 2010, 21:50
  11. GAK! the poem in your post, not this new one.

    Posted by Tess | May 29, 2010, 21:52
  12. If you did Cummings in English classes and didn’t like him, then you had incompetent teachers! Same with me: we have some great poets, and we have the tragedies of course, but the only thing our teachers managed to do is make us hate them. I started discovering their beauty on my own, years after school was over…

    Posted by Panos | May 29, 2010, 22:27
  13. [Comment content and subsequent comments removed. Do your testings in your own blog. – P.]

    Posted by testing | June 8, 2010, 00:50
  14. Gosh, do you ALWAYS have to be so elaborate? [Looking at your posts with eyes green with envy]

    Posted by Netty Gritty | September 22, 2010, 15:37
  15. …??

    Posted by Tess | September 23, 2010, 06:57
  16. Tess,
    sigh… Panos is always so brilliant. It makes me jealous!!! If I only had half the talent that he has!

    Posted by Netty Gritty | September 23, 2010, 07:23
  17. Well, I just try to be thorough…

    Posted by Panos | September 23, 2010, 10:54
  18. Hi again! Guess what! You can add image maps in a comment as well! Also, image maps work in wordpress.com blog posts now (it wasn’t possible the last time I tried).

    My latest post and its comment shows examples of image maps.

    I was wondering… since you are good in HTML and you like to experiment, may be you will want to do a how-to post for image maps! I can’t wait for the lovely goodies that will result once you begin to tweak with image map codes! :D

    Posted by Netty Gritty | September 30, 2010, 16:43
  19. NG’s post here.

    @NG:

    • When commenting in your own blog, you can add practically anything you could add via a text widget. I don’t think a visitor can use an image map in a comment; but I don’t really know that – try logging out and see.

    • Maybe it wasn’t possible with the particular tool you used. In general I think it was: I think Tess had used image mapping in her blog many months ago.

    • As for your suggestion, I’ll probably disappoint you, as I’ve never tried image mapping. In fact, I haven’t even grasped what use it may be in a blog. Ideas?

    Posted by Panos | September 30, 2010, 17:42
  20. Yes Tess seems to have used it before (apparent from her forum reply). She replied in the forums that it’s been around for at least two years. I think I tried it before that period.

    The tool I used before is the tool I use now, which is kwout.

    One thing I did find out that switching the editor to and fro messes up the code and renders it “map-less” – may be I was unknowingly making this mistake years ago, I don’t know.

    I do have some ideas for it, but I don’t want to express them before testing them. So far I have used it to quote other sites – it’s convenient for me to include multiple links within an image.

    Posted by Netty Gritty | September 30, 2010, 18:24
  21. Hi, Panos,
    I’ve spent a lot of time reading on here just lately. You have some excellent tips and thank you for sharing.

    I’ve noticed that I can post pictures in my comments and on other peoples comments using the Gigya code and the pics show up. I’m using Firefox, however they don’t show up with IE, just get a white box….

    So my question, is there a way to make IE show them too?

    Posted by Ray | November 7, 2010, 02:02
  22. Hi Ray,

    It’s not clear to me how you post pictures via gigya; please explain and link to an example.

    “On other peoples comments” is also not clear to me: why interfere with others’ comments?

    Posted by Panos | November 7, 2010, 09:48
  23. Sorry, like a guestbook sort of thing leaving a picture….http://ray3d.wordpress.com/say-hello/

    Someone, posted a link to me, in comments so I converted it to a picture. Which showed up, using this.

    [Image removed by request – P.]

    So I went to their blog and did the same in their “guestbook” and the picture showed up there too.

    Posted by Ray | November 7, 2010, 10:15
  24. [gigya src= then the link to the pic.

    Posted by Ray | November 7, 2010, 10:18
  25. I see. The gigya shortcode is for inserting flash objects. To insert an image you use the standard HTML for an image – see here:
    https://wpbtips.wordpress.com/2009/04/01/codes-useful-for-text-widgets/
    That should take care of things in lousy IE too.

    Posted by Panos | November 7, 2010, 10:32
  26. OK thanks a lot…Sorry for the confusion. :)

    Posted by Ray | November 7, 2010, 10:36
  27. Let me try again, some of my friends like to post pictures in guestbooks. (Or pages that could be used as guestbooks).
    As we know, the proper code is stripped out, when trying to post a pic in someone else’s comments.

    I just thought I’d try [gigya src=” to post a pic in someone else’s comments, to see what happened.

    So all I’m saying is it worked with Firefox, but not with IE. Wether that’s a good or bad thing, I don’t know…

    Posted by Ray | November 7, 2010, 13:18
  28. Gigya shortcode works for putting pictures in comments!! Logged in or logged out.
    Not just the link:

    Though apparently not in IE browers

    @Ray,
    Does other gigya code work in IE? For example:
    https://wpbtips.wordpress.com/2010/08/16/widgets-for-wpcom-3-analog-clocks/#comment-4104

    Posted by gracie | November 7, 2010, 16:37
  29. Thanks Gracie, Yep the Globe works in IE, but not in Firefox.
    It looks great too!

    Posted by Ray | November 7, 2010, 16:47
  30. @Ray,
    So you can see this in FireFox, but not in IE:

    [Image removed by request – P.]

    But the opposite is true for the globe? (BTW, I don’t think the globe stats are very dependable.)

    Posted by gracie | November 7, 2010, 16:52
  31. Correct, not in IE.

    The globe did show up in Firefox when I went to the actual site, but not on the page here for some reason. With IE it shows up here too.

    Posted by Ray | November 7, 2010, 17:10
  32. Ok I disabled a couple of addons in Firefox and now I see the globe here too…..

    However the pic above, all I’m getting in IE is a white box with a scroll….

    Posted by Ray | November 7, 2010, 17:45
  33. Safari, FireFox, Opera, and other browsers are capable of quite a few more functions than IE is capable of. Other than complaining to Microsoft, there is nothing you can do to make it better.

    Disabling the addons in FireFox solves the mystery of why you couldn’t see the picture here at first.

    Technically we shouldn’t be able to display images in comments on WordPress.com at all, so your discovery that the gigya code (brackets) allows them in most browsers is interesting.

    Posted by gracie | November 7, 2010, 18:14
  34. Thank you, for confirming that.

    I don’t really know what I’m doing….I do like to tinker though…. :)

    Posted by Ray | November 7, 2010, 18:31
  35. Oh, me too!
    “the answer to life the universe and everything = 42”
    But we still don’t really know what we are doing…

    Posted by Anonymous | November 7, 2010, 20:05
  36. Sorry, I won’t go along with this: gigya is not for inserting images, and visitors should not be able to post images (unless you like porn spam).

    Posted by Panos | November 7, 2010, 22:12
  37. Yes, of course, you are right: just because one can do a thing, doesn’t mean it should be done. I didn’t consider that earlier today; apology is due

    There have been lots of wp.com people looking for a way to have commenters post pictures. One reason given for preventing it is that there is no way to prevent a commenter from posting huge uncompressed files. But this “trick” seems to prevent that.

    But the other reason I wasn’t thinking about, the porn spam—well that certainly would not be desirable. And I suppose hot-linking might be an issue as well. It would also be a simple matter for a commenter to post pictures belonging to someone else

    Do you think that this is an staff oversight?

    Posted by Tess | November 7, 2010, 23:55
  38. Personally, I’ve never seen any porn spam, I don’t see the harm in it within a small group of friends who have private blogs.

    I don’t intend to use it anyway, as most of my friends have IE.

    Posted by Ray | November 8, 2010, 00:31
  39. Also, as things stand right now, isn’t it possible to post a video in in someone else’s blog comments? Video spam, sounds much worse to me than picture spam. There’s always the delete button of course.
    Not that I want to post videos in people’s comment’s.

    I do agree that the method I was looking at to post pictures, is not the correct way. Again, it’s pointless to use it, if most people see just a white square. Perhaps WP will allow us to use the correct code in the future,

    Posted by Ray | November 8, 2010, 01:16
  40. @Tess:

    Another interesting thing with this trick is that you cannot drag to desktop or right-click to copy the image.

    Oversight? I don’t think you can prevent a URL from working with a shortcode. But anyway WP ignores gigya.

    PS Are you sure you want the image you posted to remain there?

    @Ray:

    If you’ve never seen porn spam, then maybe you haven’t been blogging that long…

    Of course spam is not an issue in private blogs.

    Yes, WP allows posting videos in comments, but only from controlled sources such as YouTube.

    As you said, relying on the gigya shortcode is pointless. The “correct code” is the HTML code for images, but I don’t think WP will ever allow it for visitors: spamming apart, users who don’t know much about image sizes and theme widths would easily mess your blog and break the theme. So, visitors post links, you turn them into images.

    Posted by Panos | November 8, 2010, 05:07
  41. please, yes, can you change the image? or link? or just delete me?

    Posted by Tess | November 8, 2010, 06:09
  42. Yep would you delete my image and link too, Panos…Thanks!

    Posted by Ray | November 8, 2010, 06:22
  43. Done.

    Posted by Panos | November 12, 2010, 22:55
  44. I’ve tried to insert [a href] tags into my comment REPLIES but they don’t show up as links in my comments.

    I’m using the standard WP comments widget . . . are you perhaps talking about another one?

    Posted by Todd Rawlings | January 28, 2011, 19:02
  45. @Todd: As I told you in my other reply, I’m talking about wp.com blogs: ‘your’ standard WP whatever is not ‘our’ standard WP whatever!

    But I find it highly unlikely that link tags don’t work in your comments (unless you’re making some typo with the code). Or are you talking about the comment excerpts in your sidebar?

    Posted by Panos | January 29, 2011, 11:46
  46. [Comments removed – P.]

    Posted by Andreas | March 14, 2011, 16:27
  47. “Test the functions” in your own blog, mr “bold italian” Andreas.

    Posted by Panos | March 14, 2011, 16:39
  48. how to show image on a comment like demo comment above?

    Posted by Moesafir Besmah | March 19, 2011, 17:52
  49. thanks Panos, ill checkit out

    Posted by Moesafir Besmah | March 19, 2011, 18:05
  50. Nice read! Thanks

    [Wrong username link removed – P.]

    Posted by Carlie Zunino | August 15, 2011, 04:03

Trackbacks/Pingbacks

  1. Pingback: WordPress.com Comments and Discussion Settings « onecoolsitebloggingtips - December 21, 2010

  2. Pingback: Qualche altro elemento HTML – #ltis13 « Insegnare Apprendere Mutare - April 29, 2013

  3. Pingback: Vediamo un po’ di HTML – #loptis « Laboratorio Online Permanente di Tecnologie Internet per la Scuola – #loptis - November 29, 2013

Author

author's avatar panos (justpi)

 Subject Index

Announcement 22/03/2012: After WP's latest move, this blog will no longer offer active support and assistance. The blog will remain online but commenting has been disabled.
✶ All theme-related posts are updated up to and including theme 189 in this list, but will not continue to be updated.

Stats

  • 3,960,129 views
Safari Icon Firefox - Never Internet Explorer
Note: if you see ads on this site, they are placed by WordPress, not me.
wpbtips.wordpress.com
Mostly on themes, formatting, coding, tweaks and workarounds.
Based on or springing from my contributing in the wp.com forum.
Theme-related posts constantly updated
Premium themes and Annotum not included