What is the difference between and in HTML, and do they affect website rankings?

后端 未结 4 1200
长情又很酷
长情又很酷 2021-02-03 22:40

What is the difference between and ? I have read here that there are semantic differences between and

4条回答
  •  天涯浪人
    2021-02-03 23:22

    and both still exist in the HTML specification.

    • The element represents a removal from the document.
    • The represents contents that are no longer accurate or no longer relevant.

    That is to say that they actually represent different things semantically. Specifically would be used if you had an existing document and wanted to indicate text that was in the document, but has been removed. This would be different than text in a document that is no longer accurate, but that has not been removed (you could use for that).

    You should not use or depend on either for styling even though most browsers do have them strike-through by default. You should only rely on CSS for presentation.

    Due to the mercurial nature of how search engines work, it's very difficult to say whether one tag or another will make a difference on how keywords are created and your content is indexed. You should focus on creating good content that is semantically correct, and your website rank will follow.

提交回复
热议问题