A community dedicated to all things web development: both front-end and back-end. For more design-related questions, try /r/web_design.
Prism Include HTML with Script
Hi everybody,
I'm trying to made my website. I need to use prism to color my HTML code.
I made this but the problem is , at the line <script src="script.js> </script>
the </script> close my <script type="prism-html-markup">
Do you have a solution to avoid that ?
<pre><code class="language-markup" > <script type="prism-html-markup"> <!DOCTYPE html> <html LANG="fr"> <head> <title>HelloWorld</title> <link rel="stylesheet" media='screen and (min-width:300px) and (max-width: 1200px)' href="phone.css"> <link rel="stylesheet" media='screen and (min-width: 1200px) and (max-width: 2500px)' href="computer.css"> <meta charset="UTF-8"> </head> <body> <div id="hello_txt"></div> <script src="script.js" type="text/javascript"> </script> </body> </html> </script> </code> </pre>
Thank you in advance for your help
looks like you dont know formatting on reddit
` that is a backtick use three in front and after the code to form a code block, \ use a backslash to escape backticks to make make them litteral
also you can use a backslash infront of reddit formating characters to escape othrr special characters
the script
<script type="prisim-html-markup">
isnt closed, as i cant see because you didnt escape properly i assume that.I added a code block to wrap my code.
At the line <script src='script.js" type="text/javascript"></script> <-- This </script> close the script type and the rest of the code is not shown.
This part is not shown