D
D
Dmitry2019-12-17 11:08:44
HTML
Dmitry, 2019-12-17 11:08:44

How to insert sample HTML code into Pug?

Faced a problem.
You need to insert code examples into Pug.
CSS and JS are inserted without problems, but there are problems with HTML, since Pug perceives it not as text, but as code and does not display tags on the screen.
Plz tell me how to make Pug think that certain tags are just text.
Here is an example of what happens https://codepen.io/Odinokun/pen/ZEYBRMQ?editors=1010

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lord_Dantes, 2019-12-17
@Lord_Dantes

1. The code tag is not intended for html, but is intended for functions of variable names and so on in program code.
CSS in your case is also text because you wrote it like this, if you add <style></style>it, it will also become working.
2. Specifically, it didn’t work with the code and showing it, but it only comes to mind to show it as text in a normal div and that’s it.
htmlbook.ru/faq/kak-otobrazit-tegi-na-web-page

E
Evgeny Zhurov, 2019-12-17
@Zhuroff

Is it somehow like that . But if there is a lot of code, then xs, how convenient this approach will be)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question