Lets say you have an HTML element like so:
<p id="theparagraph">Hello there!</p>
You can style it by using CSS or javascript, respectively, like so:
#theparagraph{
color:green;
}
document.getElementById("theparagraph").style="color:blue";
It has come to my attention that, with an ordered list, you can style the "marker" attribute (or whatever it is called). This is the individual number that comes before the text of an ordered list item. Here is an example:
<ol>
<li id="thelistitem">
Hello there!
</li>
</ol>
You can style it in CSS by doing the following:
#thelistitem{
color:blue;
}
#thelistitem::marker{
color:red;
}
But, my question is, what is the equivalant for that in javascript? I have tried the following, with no success:
document.getElementById("thelistitem").style="::marker{color:blue}";
document.getElementById("thelistitem").style::marker="color:blue";
document.getElementById("thelistitem").style.marker="color:blue";
None of them have worked. What DOES work? And I am not asking for a class that is assigned and taken away from elements. I am asking for the style of it. How would one edit it?