Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lisp-style quotation in HTML

Tags:

html

lisp

In Lisp, evaluating '(+ 1 2) produces '(+ 1 2), not 3. It seems that HTML doesn't support Lisp-style quotation so you can't say something like <quote><b>not bold</b></quote> in HTML and let it just produce <b>not bold</b> instead of not bold.

Is there any technical reason or historical reason for that? Thanks.

like image 641
twimo Avatar asked Nov 23 '25 15:11

twimo


1 Answers

HTML has nothing to do with Lisp and did not derivate from it, so there's no reason that particular syntax should behave that way. You can, however, include literal representations of HTML tags in your markup by substituting the < and > signs with their HTML entities, like this:

&lt;b&gt;not bold&lt;/b&gt;

This will produce:

<b>not bold</b>

like image 77
Jimmy Avatar answered Nov 26 '25 06:11

Jimmy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!