v-html
Updated on Sep 5, 2025 1 minutes to readThe v-html directive sets the inner HTML of an element.
It takes a string containing HTML markup and replaces the element’s content with the rendered HTML.
• Example
<div v-html="'<h1>Title</h1><p>Some <em>italic</em> text.</p>'"></div>
<!-- Result:
<h1>Title</h1>
<p>Some <em>italic</em> text.</p>
-->