Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of `lt` in `[if lt IE 9]`

Tags:

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]--> 
like image 675
Masayuki Suzuki Avatar asked Jan 02 '17 16:01

Masayuki Suzuki


Video Answer


2 Answers

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.

like image 194
Jon Uleis Avatar answered Oct 19 '22 07:10

Jon Uleis


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)

like image 44
GKGeofferton Avatar answered Oct 19 '22 05:10

GKGeofferton