What languages ​​can be embedded in HTML5?

As far as I know:

  • CSS can be embedded via <style>

  • JavaScript can be embedded via <script>

  • MathML can be embedded via <math>

  • SVG can be embedded via <svg>

Are there any other languages ​​that can be embedded in HTML5?

If so, could you show me some examples?

+4
source share
1 answer

In fact, there are no restrictions. For example, you can embed any language in <script> tags or through CSS. Assume the following:

 <html> <head> <script type="text/x-my-cool-language"> PrintTheAnswer() </script> <script src="my-cool-interpreter.js" type="text/javascript"></script> </head> <body> … </body> </html> 

The same goes for CSS. Some technologies use this, in particular, such as LESS and CoffeeScript . In both cases, the actual interpretation of the embedded language is processed by JavaScript, which is loaded additionally (as in the above example).

+6
source

All Articles