HTML in Comment

Do You know that You can use HTML in your WordPress comment? There are 14 elements You can use to prettify your comments. The elements are a, abbr, acronym, b, blockquote, cite, code, del, em, i, q, s, strike, and strong. Some of them might also have attribute(s) that can be modified.

<a>

The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link’s destination.

In WordPress comment, this element has 2 attributes that can be used they are href and title. Fill the href attribute with some kind of URL and title attribute with a related title Specifies extra information about an element (displayed as a tool tip) .

<abbr> & <acronym>

The <abbr> tag defines an abbreviation or an acronym, like “Mr.”, “Dec.”, “ASAP”, “ATM”.

Tip: An abbreviation and an acronym are both shortened versions of something else. Both are often represented as a series of letters.

Marking up abbreviations can give useful information to browsers, translation systems and search-engines.

The elements have one and only attribute that can be used for the comment and that is title. This attribute works the same behavior with <a> tag, when You hover it, the tool tip will show You content of the title. Those tags are similar, probably the same, but when You are writing your own HTML page You might want to use only abbr tag. because…

The <acronym> tag is not supported in HTML5. Use the <abbr> tag instead.

<b>, <strong>, <i> & <em>

These elements are Formatting elements. <b> similar with <strong>, <i> similar with <em>. <b> means bold, <strong> also bold but with added semantic “strong” importance. <i> means italic, <em> also italic but with added semantic importance.

Here is some examples of combination from the elements.

no format = no format.
<b>bold</b> <strong>strong</strong> = bold strong.
<i>italic</i> <em>em</em> = italic em.
This sentence is important but not as important as this.

<blockquote>, <q> & <cite>

A quotation is the repetition of one expression as part of another one, particularly when the quoted expression is well-known or explicitly attributed by citation to its original source, and it is indicated by (punctuated with) quotation marks.

Paragraph above is quoted from wikipedia. I use a special element to make the appearance different with other section. I use <blockquote>tag. <blockquote> and <q> tag are the same, the difference is <blockquote> used for a long quote, and <quote> for shorter version of quote. I personally use <blockquote> in a self paragraph, and <q> for quoting a sentence inside a paragraph.

Those two tags, has an attribute that can be filled. The attribute is called cite, it usually has a value of a URL which means Specifies the source of the quotation. The attribute can be a self tag called <cite>, I haven’t actually use it a lot, I just usually use the quoting tag directly, but for example most of my references is taken from w3schools.com.

<code>

I should love this element the most. This element is me, haha.The <code> tag is a phrase tag. It defines a piece of computer code. This element make a block of text pretty different, if we take a look at other elements, this is the only element that change the background.

This element has an inline display, so if You want to make the piece of code more visible You might want to add more spaces between before and after block.

<del>, <s> and <strike>

Last but not least, for a strike through decoration text we can use these elements. The only element that has attribute that can be modified is <del> element. The attribute is datetime, if You want a precise thing for you deletion thing, You can use this element with the attribute datetime even though the format is pretty hard to memorize YYYY-MM-DDThh:mm:ssTZD.

I don’t use this kind of element so much, but maybe if You are working in a project and need versioning, You can use these element to mark that something has changed. Or, just use it to make your text noticeable in the comments.


So, now is the time to try these elements in the comment. I haven’t tried much
but I might add a comment to this post after.

Published by

yuulye

Male, Indonesian, Muslim, Programmer, 27 y.o. Single by Bye... You are a poet, you just don't know it...

62 thoughts on “HTML in Comment”

  1. HTML
    is the standard markup language for creating web pages and web applications.
    With
    CSS
    and JavaScript it forms a triad of cornerstone technologies for the
    World Wide Web. Web browsers receive HTML documents from a web server or from
    local storage and render them into multimedia web pages. HTML describes the
    structure of a web page semantically and originally included cues for the
    appearance of the document.


    console.log('JavaScript');

    FYI,

    If You want to check my other posts You can visit my sites
    yuulye.github.io &
    yuulye.wordpress.com.

    Liked by 2 people

    1. I’m afraid that images related comment can’t be done in WordPress, I will try to search though, if not I just research more on how to prettify content, I’ll let You know if I found something about this gif thing

      Liked by 3 people

      1. No they haven’t even started bcoz it’s still the preparatory leaves going on..😂😮.. The pesky boards as one of my friends says…. Will start from 6th March 😂😂😂🐢❤😆

        Liked by 3 people

      2. I was going to comment about the death but it will be weird if people see it always me on your comment section 😆
        Yes yo go mom! Don’t let the kid go wild! 😂

        Liked by 2 people

  2. Thank you, I have just been searching for info about this subject for ages and yours is
    the best I’ve came upon till now. But, what in regards to the
    bottom line? Are you positive about the supply?

    Liked by 3 people

    1. I’m afraid there are no bottom line / underline, those 14 tags I found it from checking the WordPress.org source code, it probably won’t work if the blog owner disable html for the comment section

      Liked by 2 people

Leave a comment