View Single Post
Old 09-30-2020, 10:45 AM   #8
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,363
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by mingsphinx View Post
Most readers will allow a different color scheme for links. I am wondering if instead of defining the text with a <span> tag, would I get to use a different color in my texts by using a link <a> tag that has a null href?
No, I wouldn't try and kluge together a different tag <a> just to get a color change...1) eink displays can't display color and 2) it is semantically incorrect.

The <em> tag is specifically designated for text that needs to be emphasized. If you don't define the styling you want for <em> it usually defaults to italics but you can designate the style however you want.

eg
em {color:red; text-decoration:underline}

If the device you are using doesn't respect the publisher's CSS then you could try giving in-line styling *shudder*

eg
<p>This sentence contains an <em style="color:blue">emphasized</em> word.</p>

That doesn't help with non-color displays....so, again, your best bet is to try media queries. Then you can have stuff like:

If this device is an eink:
em {font-weight:bold}

If this device isn't an eink, but can't display color:
em {font-style:italic}

all other devices:
em {color:blue}

with:
<p>This sentence contains an <em>emphasized</em> word.</p>

note: that is not the proper syntax for media queries...just giving the idea...but you can learn a little bit more about how to do them at the W3Schools website.

There is also a Sigil plugin, AddKindleMediaQueries that will add some code to get you started with kindle devices...you will need to figure out the other devices on your own.

Cheers,

Last edited by Turtle91; 09-30-2020 at 10:50 AM.
Turtle91 is offline   Reply With Quote