What is the difference between the tag and the s?

12

I saw the tags <del> and <s> , say that one is to be used in non-relevant texts and another to "delete" part of the text, but when using both tags the effect is the same ( a line scratching the phrase). What's the difference? Does something change I use one or the other?

    
asked by anonymous 07.12.2018 / 17:40

3 answers

11

Visually speaking the result is the same, but the intent is different, the html tags are used for marking, as its name suggests, ie, it defines the content, html serves to separate the parts.

<del>

A text that a part was deleted, and a new part was inserted.

<s>

Tag text that is not correct

Font

Despite the visual result is the same, the intention is different, a front-end can treat the two tags with different formatting, if you format your text with the real meaning of the tags the style of the front-end will be applied correctly.

    
07.12.2018 / 17:50
1

The <del> tag is used to identify text that has been deleted from a document but retained to show the history of modifications made to the document. Pair a <del> element with a <ins> element to identify the inserted text that has replaced the deleted text.

  

Example

A enciclopédia mais importante do mundo é <del>Enciclopédia Britânica</del> <ins>Wikipedia</ins>.

The<s>tagisusedtoidentifytextsthatarenolongeraccurateorrelevant.Itissimilarbutsemanticallydistinctfromthe<del>tagthatisusedtoidentifydocumentedits.

    
07.12.2018 / 19:38
-4

<s> is a tool made so that the person who looks at the code has the knowledge that that information should be changed or corrected. Understand <s> as a sort of alert.

<del> , in turn, causes the text not to be rendered!

    
07.12.2018 / 17:49