What do these characters mean in html?

I found this code while surfing through jquery hint. Please suggest why we are using certain code and what does it mean?

 <pre class="prettyprint">
 &lt;head&#62;

   &lt;script&#62;
    $(document).ready(function() {
        $('.tooltip').tooltipster({
            contentAsHTML: true
        });
    });
&lt;/script&#62;
&lt;/head&#62;
&lt;body&#62;

&lt;div class="tooltip" title="&amp;lt;img src=&amp;quot;my-  image.png&amp;quot; /&amp;gt; &amp;lt;strong&amp;gt; This text is in bold case   !&amp;lt;/strong&amp;gt;"&gt; 
    This div has a tooltip with HTML when you hover over it!
&lt;/div&#62;

&lt;/body&#62;</pre>

      

+3


source to share


5 answers


The code you entered is html encoded, which means with html special characters:

<script>
    $(document).ready(function() {
        $('.tooltip').tooltipster({
            contentAsHTML: true
        });
    });
</script>
</head>
<body>

<div class="tooltip" title="<img src=my-image.png /> <strong> This text is in bold case!</strong>"> 
    This div has a tooltip with HTML when you hover over it!
</div>

</body></pre>

      

ISO-8859-1 is the default character in HTML 4.01, see the XML and HTML character list for more information.

For example, "&lt;" is "<" (less-than sign, U+003C)

The code you were trying to understand creates a tooltip when the user hovers the mouse over a div with text



This div has a tooltip with HTML when you hover over it!

The dashboard content is between the title tag, so

<img src=my-image.png /> <strong> This text is in bold case!</strong>

img - show image ant text between strong ... strong :-)

+2


source


These are HTML entities used to display characters on the page, such as those that are the actual html code. So < >

as an HTML entity &lt; &gt;

(less, more). &copy;

is a copyright symbol, etc.



0


source


&lt;

used for <symbol . Similary is &gt;

used for the > symbol . These are known as HTML entities.

On a side note, you may want to reference this for future reference.

0


source


Please refer to this resource for a better understanding http://w3schools.com/HTML/html_entities.asp

0


source


These are html objects. Reserved characters in HTML

must be replaced with character entities. Characters missing from your keyboard can also be replaced with entities.

0


source







All Articles