Asked 7 years ago
9 Jan 2017
Views 1474
jessica

jessica posted

<meta charset=“utf-8”> vs <meta http-equiv=“Content-Type”>

HTML5 Doctype had

<meta charset="utf-8" /> 

and

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

so what is difference between <meta charset="utf-8" /> and <meta http-equiv="Content-Type" > ?
and what is pros and cons over each other ?
which one is best to use between <meta charset="utf-8" /> and <meta http-equiv="Content-Type" > ?
i used both in some web application . but did not find good difference between , so which is best to use for which purpose between <meta charset="utf-8" /> and <meta http-equiv="Content-Type" > ?
Phpworker

Phpworker
answered Nov 30 '-1 00:00

<meta charset="utf-8" /> is for utf-8 encoding type
and <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> is for html content.
Post Answer