Quote:
Originally Posted by Tex2002ans
I'm confused:
- Colors
- Highlighting
- Emphasizing
- Underlining
- Fonts
What's the ultimate goal here?
Can you show us an example picture of a document and what you're trying to achieve?
<u> is HTML for underline.
If underlining is what you want, that would achieve it. And every single reader/browser in the world would display an underline:
Code:
<p>This is a sentence with <u>underlined</u> text.</p>
Trying to hack links (<a>) to do this is a very, very bad idea.
... Are you trying to create an actual link? Or emphasizing? Or what?
If you're having trouble getting basic HTML links to work, I believe you're trying to jump too far into the complicated deep-end.
I would highly recommend learning some more of the basics of HTML first:
- What's a <p> tag?
- How does <img> work?
- How does <a> work? What's it used for?
Here's an example I wrote last year about <a>:
Post #3 in "hyperlink endnotes"
I even color coded the parts of a link red+blue in order to explain easier.
|
Thank you but I am
not trying to hack anything using HTML. And thank you for pointing out the <u> tag which I missed earlier.
The problem is this: with the proliferation and increasing popularity of cell phone based eReaders, in particular with the advent of OLED enabled Dark Mode, more and more eBooks are being consumed by readers using their mobile phones. Some eReaders like Moon+Reader will repect CSS styling whereas other eReaders like Prestigo will not. There are many reasons to choose one eReader over another and no one app can be said to dominate the space. Prestigo for instance offers text-to-speech for free whereas one would have to pay for it in Moon+Reader. Because of the heterogeneity of the eReader space, the final product which the reader experiences can be somewhat unpredictable; particularly if one uses CSS.
To be absolutely certain that the final product looks similar regardless of the device used to render it, creators of eBooks are left with only the most basic tools like <b>, <i> and <u>. Unlike the style sheets which some eReaders will disregard, all eReaders I have looked it seem to respect these basic tags. Meaning that if you style your work only with these tags, it should then look more or less the same agnostic of the viewing device. I say more or less because aside from ignoring the document styling, some eReaders will force their own styling like increasing the line spacing.
This brings me to my interest in the <a> tag. All eReaders that can display color which I have looked at will display a link as blue and all eReaders will underline a link. This means that the creator of a book can, in a somewhat sneaky way, trick the eReader into displaying text color other than say white font on black. If it can be made to work, this is a way of grabbing back some control.