What do < and > stand for?

HtmlTerminologyHtml EntitiesHtml Escape-Characters

Html Problem Overview


I know that the entities &lt; and &gt; are used for < and >, but I am curious what these names stand for.

Does &lt; stand for something like "Left tag" or is it just a code?

Html Solutions


Solution 1 - Html

  • &lt; stands for the less-than sign: <

  • &gt; stands for the greater-than sign: >

  • &le; stands for the less-than or equals sign:

  • &ge; stands for the greater-than or equals sign:

Solution 2 - Html

&lt; Less than: <

&gt; Greater than: >

Solution 3 - Html

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

Solution 4 - Html

Others have noted the correct answer, but have not clearly explained the all-important reason:

  • why do we need this?
What do < and > stand for?
  • &lt; stands for the < sign. Just remember: lt == less than
  • &gt; stands for the > Just remember: gt == greater than
Why can’t we simply use the < and > characters in HTML?
  • This is because the > and < characters are ‘reserved’ characters in HTML.
  • HTML is a mark up language: The < and > are used to denote the starting and ending of different elements: e.g. <h1> and not for the displaying of the greater than or less than symbols. But what if you wanted to actually display those symbols? You would simply use &lt; and &gt; and the browser will know exactly how to display it.

Reference: https://dev.w3.org/html5/html-author/charref

Solution 5 - Html

&lt; ==  lesser-than == <
&gt; == greater-than == >

Solution 6 - Html

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

Solution 7 - Html

&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;).

Solution 8 - Html

&lt; stands for lesser than (<) symbol and, the &gt; sign stands for greater than (>) symbol.

For more information on HTML Entities, visit this link:

https://www.w3schools.com/HTML/html_entities.asp

Solution 9 - Html

In HTML, the less-than sign is used at the beginning of tags. if you use this bracket "<test1>" in content, your bracket content will be unvisible, html renderer is assuming it as a html tag, changing chars with it's ASCI numbers prevents the issue.

with html friendly name:

  &lt;test1&gt; 

or with asci number:

 &#60;test1&#62;

or comple asci:

&#60;&#116;&#101;&#115;&#116;&#49;&#62;

result: <test1>

asci referance: https://www.w3schools.com/charsets/ref_html_ascii.asp

Solution 10 - Html

in [tag:rails]:

&lt=    this is    <=
=&gt    this is    =>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMichiel PaterView Question on Stackoverflow
Solution 1 - HtmlbiscuitstackView Answer on Stackoverflow
Solution 2 - HtmlJames GoodwinView Answer on Stackoverflow
Solution 3 - Htmlmeder omuralievView Answer on Stackoverflow
Solution 4 - HtmlBenKoshyView Answer on Stackoverflow
Solution 5 - HtmlMārtiņš BriedisView Answer on Stackoverflow
Solution 6 - HtmlGreg TreleavenView Answer on Stackoverflow
Solution 7 - HtmlKathirView Answer on Stackoverflow
Solution 8 - HtmltejasguptaView Answer on Stackoverflow
Solution 9 - HtmlzamoldarView Answer on Stackoverflow
Solution 10 - HtmlshilovkView Answer on Stackoverflow