What is the difference between http-equiv="author" and name="author"?
Asked Answered
S

1

6

Hello I'm learning HTML5 and I'm wondering what is the difference between these two meta elements ?

<meta http-equiv="author" content="Jon Smith" />
<meta name="author" content="Jon Smith" />
Steddman answered 31/3, 2016 at 14:15 Comment(0)
I
7

The first is not valid, http-equiv is enumerated, i.e. it has a set of values that are valid for it and author is not one. (Its intended as a way to pass pragma data to the browser such as rendering instructions, not meta data like document properties.)

<meta name="author" content="Jon Smith" /> is valid.

Inclining answered 31/3, 2016 at 14:43 Comment(3)
Can you expand with examples please (typical http-equiv as against name)?Hedwig
The possible values for http-equiv are here: developer.mozilla.org/en-US/docs/Web/HTML/Element/…Inclining
The name="whatever" semantics are described here: developer.mozilla.org/en-US/docs/Web/HTML/Element/…Inclining

© 2022 - 2024 — McMap. All rights reserved.