लाइनों के बीच की दूरी निर्धारित करने के लिए, लाइनहाइट . का उपयोग करें संपत्ति। जावास्क्रिप्ट के साथ टेक्स्ट में लाइनों के बीच की दूरी निर्धारित करने के लिए आप निम्न कोड चलाने का प्रयास कर सकते हैं -
उदाहरण
<!DOCTYPE html>
<html>
<body>
<h1>Heading 1</h1>
<p id="myID">This is Demo Text.<br>This is Demo Text<br>This is Demo Text</p>
<button type="button" onclick="display()">Set distance between lines</button>
<script>
function display() {
document.getElementById("myID").style.lineHeight = "2";
}
</script>
</body>
</html>