Should I declare charset like this:
<meta http-equiv="content-type" content="text/html" charset="utf-8" />
or like this:
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
Or are both valid?
Always declare the encoding of your document using a meta element with a charset attribute, or using the http-equiv and content attributes (called a pragma directive).
Adding <meta charset="utf-8"/> in the html code solved my issue in Firefox. Save this answer.
The both declarations are valid, you could always use the short equivalent version :
<meta charset="utf-8" />
Hope this helps.
Because you start a document with
<!DOCTYPE html>
I doubt that it's necessary to specify the content type. Instead just specify the encoding/charset:
<head>
<meta charset="UTF-8">
</head>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With