Your cart
  • IMG
    {{cart_item.name}}
    {{cart_item.variation_attribute_name}}: {{cart_item.variation_attribute_label}}
    {{cart_item.item_unit}}: {{ setCurrency(cart_item.price)}}
    {{ setCurrency(cart_item.price*cart_item.quantity)}}
    Invalid quantity more than stock
Total :
{{setCurrency(cart.sub_total)}}

There is no item in the cart. If you want to buy, Please click here.

HTML ID and Class

এইচটিএমএল(HTML) টিউটোরিয়াল

Created by : mamun_1
HTML,CSS,Javascript
tutorial
Programming, Software and application
212
2020-10-03 12:17:22

HTML ID and Class 


ID

ID দিয়ে এইচটিএমএল এর একটি নির্দিষ্ট ইলিম্যান্টকে স্টাইল দেওয়ার কাজে ব্যবহৃত হয়।

  • একটি ইলিম্যান্ট এর জন্য একটি মাত্র ID ব্যবহার করা যায়।
  • একটি ID একটি পেইজে মাত্র একবার ব্যবহার করা যায়।

সিএসএস এ id এর রুল গুলো লেখা শুরু করার আগে # চিহ্ন দিতে হয় তারপর id এর নাম এবং শেষে দ্বিতীয় ব্র্যাকেটের মধ্যে সিএসএস রুল গুলো লিখতে হয়

উদাহরন:

<!DOCTYPE html>

<head>

<title>ID Example</title>

 <style>

 p {

 color:red;

 }

 #myid {

 color:blue;

 }

 </style>

</head>

 

<body>

<h1> Hello web! </h1>

<p>This is a paragraph </p>

<p id="myid">This is another paragraph with an id </p>

<p>This is another paragraph with an id </p>

</body>

</html>


 

Class

অপর দিকে class দিয়ে একের অধিক ইলিম্যান্টকে স্টাইল দেওয়া যায়।

  • একই class একের অধিক ইলিম্যান্ট এর মধ্যে থাকতে পারে।
  • একই ইলিম্যান্ট এর একের অধিক class থাকতে পারে।

সিএসএস এ class এর রুল গুলো লেখা শুরু করার আগে . [ডট] চিহ্ন দিতে হয় তারপর class এর নাম এবং শেষে দ্বিতীয় ব্র্যাকেটের মধ্যে সিএসএস রুল গুলো লিখতে হয়

উদাহরন:

<!DOCTYPE html>

<head>

<title>ID Example</title>

 <style>

 p {

 color:red;

 }

 .myclass {

 color:blue;

 }

 

.myclass2 {

 font-size:20px;

 font-weight:bold;

 }

 </style>

</head>

 

<body>

<h1> Hello web! </h1>

<p>This is a paragraph </p>

<p class="myclass">This is another paragraph with a class </p>

<p>This is another paragraph </p>

<p class="myclass2">This is another paragraph with another class </p>

<p class="myclass myclass2">This is a paragraph with two class</p>

</body>

</html>