tags:

views:

101

answers:

3

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.

+7  A: 

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>

Jimmy Cuadra
I of course know the HTML entities, that's why you can see <b>not bold</b> in my own post. But the point of my questions is: I think the Lisp way is more WYSIWYG, rather than the entity-encoding way.
PainterZ
+5  A: 

You can quote markup in any SGML/XML dialect using a CDATA section like this:

<![CDATA[<b>not bold</b>]]>

rockpiper
A: 

code is data data is code.

Check this out. It might help you some.

Gutzofter
See my comment to my own post
PainterZ