Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I know what these entities are used for, but I am curious for where they stand for.

Does < stand for something like "Left tag" or is it just a code?

Maybe I can use the abbreviation as a mnemonic.

share|improve this question
8  
3  
Funny. I've been using these for ten years and hadn't realized what they stood for until now. – Azmisov Jul 2 '14 at 5:09
1  
@LaurentS. "lt" = "less than" may only be easy to figure out if you took basic math instruction in English. – Matthew Leingang Jul 20 '15 at 17:57
up vote 255 down vote accepted

&lt; stands for the less-than sign ( < ) and &gt; stands for the greater-than sign ( > )

share|improve this answer
    
so does &gt;= mean >= (greater or equal) – Ronaldinho Learn Coding Jul 30 '15 at 22:42
    
@RonaldinhoLearnCoding &gt;= will display >=, but if you prefer to use the literal characters, greater or equal (≥) is &ge;, and less than or equal (≤) is &le;. – gkubed 6 hours ago

&lt; Less than

&gt; Greater than

share|improve this answer
2  
I thought lt stands for left tag. But gt was breaking my assumption. – abatishchev Feb 25 '13 at 20:20
    
I can replace < with &lt; Similarly, what can I use for new line character? – Anuj Balan May 9 '13 at 11:56
1  
@AnujBalan Perhaps you want the <br> tag? You don't need to escape a newline character in HTML. Most programming languages (notably JavaScript) use \n to escape newlines in strings. But if you want a paragraph character use &para; - also check out w3schools.com/tags/ref_entities.asp – David Jun 10 '13 at 11:18

They're used to explicitly define less than and greater than symbols. If one wanted to type out <html> and not have it be a tag in the HTML, one would use them. An alternate way is to wrap the <code> element around code to not run into that.

They can also be used to present mathematical operators.

<!ENTITY lt      CDATA "&#60;"   -- less-than sign, U+003C ISOnum -->
<!ENTITY gt      CDATA "&#62;"   -- greater-than sign, U+003E ISOnum -->

http://www.w3.org/TR/html4/sgml/entities.html

share|improve this answer
&lt; ==  lesser-than == <
&gt; == greater-than == >
share|improve this answer

&lt = less than <, &gt = greater than >

share|improve this answer

&gt; and &lt; is a character entity reference for the > and < character in HTML.

It is not possible to use the less than (<) or greater than (>) signs in your file, because the browser will mix them with tags.

for these difficulties you can use entity names(&gt;) and entity numbers(&#60;).

share|improve this answer
    
What is the character entity reference for 'new line character' ? – Anuj Balan May 9 '13 at 11:55
    
Check this link and this may help you in finding the new line character entity stackoverflow.com/questions/3488198/… – Kathir May 9 '13 at 13:51
    
Its &#10; Got it from a site. – Anuj Balan May 10 '13 at 7:03

in :

&lt=    this is    <=
=&gt    this is    =>
share|improve this answer

protected by Community May 18 '15 at 10:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.