+ 2
why color attributes do not work here?
i want to make bg-black and font-white but there are attributes are not working please solve it https://code.sololearn.com/WV7RaU6Trxd2/?ref=app
4 Réponses
+ 9
Ayush Jat I don't think so. Or you can add inline CSS in it by adding <style> tag.
+ 10
First, I assume that you want to change your table background color and text color ( as your question doesn't mention it clearly)
I use table, tr and td tag in CSS and change their background color and text color there.
Hope this helpful! Programming is fun! 🤗😄
https://code.sololearn.com/Wm249kqfaDKF/?ref=app
+ 2
can i do it with html without css
+ 2
Ayush Jat
When writing value for an attribute, you need choose to wrap the value either by:
* Double quotes
<body bgcolor="blue">
* Single quotes
<body bgcolor='blue'>
However in your code you use two adjacent single quotes to wrap the value, that's the problem.
<body bgcolor=''black''> <!-- adjacent single quotes to wrap -->
It would still even work if you don't wrap the value by any quotes e.g. <body color=blue> but it is not a good practice, so just don't.
For better experience and ease of code maintenance you can opt to alter colour setups by using CSS. I see you're getting started with that.