· Encoding – Text – Define
encoding – HTML
- When you create HTML file, at the start of the file you can put tag
which which tells browser which encoding was used:
http-equiv="content-type" content="text/html; charset=UTF-8">
- Browser starts reading the file using some default encoding.
- When it gets to this line it switches to defined encoding if needed
and starts reading the file from the begining again.
- This is why you can place encoded text even before that line and it
will be displayed correctly:
In the below line we have placed letter Š
at the begining and end. Yellow parts show it's hex UTF-8 code: