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?
The both declarations are valid, you could always use the short equivalent version :
<meta charset="utf-8" />
Hope this helps.