কম্পিউটার টিউটোরিয়াল

CSS text-decoration দিয়ে টেক্সট সাজানো: আন্ডারলাইন, ওভারলাইন, লাইন-থ্রু


CSS text-decoration প্রপার্টি সিলেক্ট করা এলিমেন্টের টেক্সটে সাজাবার কাজে লাগে। আমরা line-through, overline, underline ইত্যাদি মান যোগ করতে পারি। এটি text-decoration-line, text-decoration-color এবং text-decoration-style-এর শর্টহ্যান্ড।

সিনট্যাক্স

text-decoration প্রপার্টির সিনট্যাক্স:

Selector {    text-decoration: /*মান*/ }

উদাহরণ

নিচের উদাহরণগুলো CSS text-decoration প্রপার্টি বোঝায়:

<!DOCTYPE html> <html> <head> <style> p:nth-child(2)::before {    content: " We will reach the destination ";    background-color: lightgreen;    text-decoration: overline blue;    font-size: 1.2em; } </style> </head> <body> <p>I'm not the only traveller</p> <p> before night. </p> </body> </html>

আউটপুট

এটি নিচের আউটপুট দেবে:

CSS text-decoration দিয়ে টেক্সট সাজানো: আন্ডারলাইন, ওভারলাইন, লাইন-থ্রু

উদাহরণ

<!DOCTYPE html> <html> <head> <style> span {    background: rgb(204,22,50);    text-decoration: blue line-through;    font-style: italic;    color: white; } p {    text-decoration: underline; } </style> </head> <body> <h2>Department Details</h2> <p> The employees of Department Marketing, Operations, Finance, <span>IT</span> are requested to email their original documents.<span> Delay in submission will lead to delayed verification.</span> </p> </body> </html>

আউটপুট

এটি নিচের আউটপুট দেবে:

CSS text-decoration দিয়ে টেক্সট সাজানো: আন্ডারলাইন, ওভারলাইন, লাইন-থ্রু


  1. CSS-এ টেক্সট ফরম্যাটিং

  2. CSS ব্যবহার করে টেক্সট অ্যালাইনমেন্ট সেট করা

  3. CSS Z-Index ব্যবহার করে এলিমেন্ট ওভারল্যাপ করা

  4. CSS color প্রপার্টি দিয়ে এলিমেন্টের টেক্সট রঙ পরিবর্তন