You must be logged in to access this section.
Login/Sign up#mybox {color: green;}
<!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" dir="rtl">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>انتخاب یک عنصر با id</title>
<style>
.box{
color: rgb(18, 212, 18);
font-size: 18px;
}
</style>
</head>
<body>
<div class='box'>code-bezan.ir</div>
</body>
</html>
#mybox{
color:#00ff00;
}
<!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>
<!DOCTYPE html>
<html>
<head>
<style>
#mybox{
color:green;
}
</style>
</head>
<body>
<div id='mybox'>code-bezan.ir</div>
</body>
</html>
#mybox{ color: rgb(14,185,14); }
Submitting answers is currently unavailable.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.