CodeSolved

A comprehensive source of programming questions and exercises

Select an element with ID

Practice Easy 188/ Download 252 Views

CSS Code Write to select the DIV below and change the color of the texts inside to green


<div id = 'mybox'> code-bezan.ir </V>

6 Answers

<!DOCTYPE html>
<html dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"content="width=device.width, initial-scale=1.0">
  <title> رنگ</title>
  </head>
  <style>
    div{
      color: green
    }
  </style>
<body>
    <div id='mybox'>code-bezan.ir</div>

</body>
</html>
<!DOCTYPE html>
<html lang="fa">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>تغییر رنگ متن</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="my-div">
        <p>این یک متن درون div است.</p>
        <p>متن دیگری در اینجا وجود دارد.</p>
    </div>
</body>
</html>
<!DOCTYPE html>
<html lang="fa">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>تغییر رنگ متن</title>
    <style>
        #mybox {
            color: green; # Change the color of the text to the green
        }
    </style>
</head>
<body>
    <div id='mybox'>code-bezan.ir</div>
</body>
</html>

Mma123 Download HTML & CSS
<!DOCTYPE html>
<html>
  <head>
    <style>
      #mybox{
        color:green;
      }
    </style>
  </head>
  <body>
    <div id='mybox'>code-bezan.ir</div>
  </body>
</html>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close