25

What is the meaning of lt in the following script?

<!--[if lt IE 9]>
  <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js">
  </script>
<![endif]-->
Spomky-Labs
  • 15,473
  • 5
  • 40
  • 64
Masayuki Suzuki
  • 417
  • 1
  • 4
  • 11

2 Answers2

38

That's an Internet Explorer conditional comment, which reads out "if using Internet Explorer less than version 9 (IE8 and lower), do this...".

When the conditional passes, HTML5Shiv is run in the browser.

HTML5Shiv is a JavaScript workaround, created by Sjoerd Visscher, to enable styling of HTML5 elements in versions of Internet Explorer prior to version 9, which do not allow unknown elements to be styled without JavaScript.

Jon Uleis
  • 17,693
  • 2
  • 33
  • 42
  • 1
    If somebody is interested in a bit of history, check out Paul Irish's [The Story of the HTML5 Shiv](https://www.paulirish.com/2011/the-history-of-the-html5-shiv/) – Juan Marco Oct 19 '18 at 17:34
9

It means the same as "less than". A list of alternative comparison operators you might encounter follows:

  • lt < (less than)
  • gt > (greater than)
  • eq == (equal to)
  • ne != (not equal to)
  • gte >= (greater than or equal to)
  • lte <= (less than or equal to)

(fixed less/greater or equal operators)

aokozlov
  • 711
  • 2
  • 7
  • 21
GKGeofferton
  • 123
  • 1
  • 5