Quote:
Originally Posted by Capricorn
Reading the mozilla reference you gave, I read this under the heading "warning":
If semantically appropriate, i.e., if it represents deleted content, use <del> instead. In all other cases use <s>.
Huh? I am very confused about this statement. According to the epubcheck <del> is correct, not <strike>, not <s>.
I would appreciate it, if someone could clarify this in some way that I can understand.
|
You can visit the other MDN pages for those explanations:
<strike> was deprecated in HTML4. (For a straight replacement, better to use <s>.)
For
<s>, it's probably not that good to use it... but, it stands for:
Quote:
contents that are no longer accurate or no longer relevant.
Note: The s element is not appropriate when indicating document edits; to mark a span of text as having been removed from a document, use the del element.
|
- - -
Side Note: You can easily also get strikethrough by applying CSS:
Code:
.striketext {
text-decoration: line-through;
}
- - -
Also, according to MDN, <s>:
Quote:
[...] is not appropriate when indicating document edits; for that, use the <del> and <ins> elements, as appropriate.
|
So, if you're actually showing DELETED or INSERTED text—like in tracked changes—then...
Use
<del> +
<ins> instead:
Quote:
The <del> HTML element represents a range of text that has been deleted from a document. This can be used when rendering "track changes" or source code diff information, for example. The <ins> element can be used for the opposite purpose: to indicate text that has been added to the document.
|
Long story short:
In normal books, you'll probably only ever need to use <s> (or the simple CSS above).
If you are working with some sort of coding book, editing book, or dealing with "tracked changes", then perhaps you may need <ins> + <del>.