Lisp-style quote in HTML

In Lisp, evaluating '(+ 1 2) produces' (+ 1 2), not 3. It seems that HTML does not support Lisp-style quotes, so you cannot say something like <quote → <b> not bold < / b> </quote> in HTML and let it just create <b> not bold </b> instead of not bold .

Is there any technical reason or historical reason? Thank.

+3
source share
3 answers

HTML has nothing to do with and is not derived from Lisp, so there is no reason why this syntax should behave this way. However, you can include literary representations of HTML tags in your markup by replacing <and> characters with their HTML objects, for example:

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

This will give:

<b> not bold </b>

+6
source

You can specify markup in any SGML / XML dialog language using the CDATA section as follows:

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

+5
source

code is data data.

Check it out . It can help you.

0
source

Source: https://habr.com/ru/post/1740867/


All Articles