How do I inline the :before element when unable to include a CSS/style section?

css, html, html-lists

Solution

In CSS, inline styles take precedence over linked CSS files, so you could do something like this with your li elements:-

<li style="color: red;">This is a list item</li>

And it would take precedence over either a linked stylesheet, or an internal stylesheet.

If you're wanting to use more complex selectors, you're out of luck unfortunately.

See: CSS Pseudo-classes with inline styles

Problem

I'm looking to style a li element, and would like to modify this CSS property: ``` li:before { color: blue; } ``` However, I am restricted to only using html, inline, styling. I don't have access to the section of the document I'm working on. Is what I am trying to do, doable, and, if so, how?

Original source

Related problems