Computer >> कंप्यूटर ट्यूटोरियल >  >> प्रोग्रामिंग >> CSS

CSS के साथ शब्द के आधार पर लाइन तोड़ें


CSS के साथ शब्द के आधार पर लाइन तोड़ने के लिए word-break प्रॉपर्टी का उपयोग करें। CSS में word-break प्रॉपर्टी लागू करने के लिए निम्नलिखित कोड आज़माएं:

उदाहरण

<html>    <head>       <style>          p.text1 {             width: 140px;             border: 1px solid #000000;             word-break: keep-all;          }          p.text2 {             width: 140px;             border: 1px solid #000000;             word-break: break-all;          }       </style>    </head>    <body>       <b>हाइफ़न पर लाइन ब्रेक:</b>       <p class = "text1">Tutorials Point originated from the idea that there exists a class of       readers who respond better to online content and prefer to learn new skills at       their own pace from the comforts of their drawing rooms.</p>       <b>किसी भी कैरेक्टर पर लाइन ब्रेक</b>             <p class = "text2">Tutorials Point originated from the idea that there exists a class of       readers who respond better to online content and prefer to learn new skills at their       own pace from the comforts of their drawing rooms.</p>    </body> </html>

आउटपुट

CSS के साथ शब्द के आधार पर लाइन तोड़ें


  1. CSS के साथ टेक्स्ट की अंतिम लाइन को संरेखित करें CSS के साथ टेक्स्ट की अंतिम लाइन को संरेखित करें

    text-align-last प्रॉपर्टी का उपयोग टेक्स्ट की अंतिम लाइन को संरेखित करने के लिए किया जाता है। CSS के साथ टेक्स्ट की अंतिम लाइन को संरेखित करने के लिए निम्नलिखित कोड आज़माएं: उदाहरण <!DOCTYPE html> <html>    <head>       <style>       &

  1. CSS के साथ लाइन तोड़ें और अगली लाइन पर लपेटें CSS के साथ लाइन तोड़ें और अगली लाइन पर लपेटें

    लाइन तोड़कर अगली लाइन पर लपेटने के लिए word-wrap प्रॉपर्टी का उपयोग करें। CSS में word-wrap प्रॉपर्टी लागू करने के लिए निम्नलिखित कोड आज़माएं: उदाहरण <!DOCTYPE html> <html>    <head>       <style>          div {    

  1. CSS से वर्टिकल लाइन कैसे बनाएं? CSS से वर्टिकल लाइन कैसे बनाएं?

    CSS से वर्टिकल लाइन बनाने के लिए, कोड निम्नानुसार है -उदाहरण<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style>    .vLine {       border-left: 6px solid rgb(128, 0, 128);