Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
  <title>v-text Directive</title>
  <style>
    #app > p {
      border: dashed black 1px;
      width: 200px;
      padding: 20px;
      font-weight: bold;
      background-color: lightgreen;
    }
  </style>
</head>
<body>
<h1>Example 'v-text'</h1>
<p>Using the 'v-text' directive to put text inside a p-tag. The existing text is replaced with the new text.</p>
<div id="app">
  <p v-text="pText">Old text.</p>
</div>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script>
  const app = Vue.createApp({
   data() {
    return {
      pText: 'This is the new text!'
    }
   }
  })
  app.mount('#app')
</script>
</body>
</html>