Colored text - "span" or "font"?

When you use something like <span style="color:#0D61FE">TEXT</span> you are using inline CSS over an html attribute (span). Most “html render engines” render inline styles in any attribute. That means you can use it almost wherever:

<var style="color:red; font-style: normal;">TEXT</var>
<i style="color:red; font-style: normal; ">TEXT</i>
<em style="color:red; font-style: normal;">TEXT</em>
<span style="color:red; font-style: normal;">TEXT</>
<font style="color:red; font-style: normal;">TEXT</font>

<font> is an old non-recommended deprecated tag, but browsers still apply styles if you use it. Is not about Obsidian but html standards.

Regarding the publish.css I noticed that your site is loading a publish.css file correctly, but the file doesn’t contains any “visual cues” (as colors or borders etc…) to verify if what you want is being applied.

Please double check if you are copying the publish.css in the right place (the root) (also check that the name of the file is publish.css, no publish.css.md or something like that) and if the styles you want are in the file. For example

.body {
  --h1-color: red;
}
1 Like