description Link to heading

Include pure HTML with CSS and JS in a Markdown post using shortcode.

test Link to heading

Following is a SVG image whose border is added using JS

Sorry, your browser does not support inline SVG.
Hello, World!

with the lines of code are

{{< html >}}
<svg id="fig1" height="100" width="100">
  <circle cx="50" cy="50" r="40"
   stroke="black" stroke-width="3" fill="red" />
  Sorry, your browser does not support inline SVG.  
</svg>

<script>
console.log("hello");
var g = document.getElementById("fig1");
g.style.border = "1px solid blue";
</script>

<div style="border: 1px solid red;">
Hello, World!
</div>
{{< /html >}}

notes Link to heading

  • Security risk if using external JS with some unknown purposes, besides what are used intendedly.