I think part of what is in play here is that UTF-8 is the default encoding for an HTML-5 file.
The characters that make up a “text” file are code points. A character encoding scheme maps the code points it understands into numbers that are stored in the file.
UTF-8 and ISO-8859-1 are two different character encoding schemes. A file can technically be encoded in one or the other (or some other scheme entirely) but not in both.
However, when a file contains only code points that are encoded identically by 2 or more encoding schemes, then, unless there is some special meta-data in the file to indicate which encoding scheme is being used, the “proper” scheme is not knowable from the file’s contents.
UTF-8 is a variable-length encoding (the size of the number each code point is mapped to varies); ISO-8859-1 is a fixed length encoding (the size of the number each code point is mapped to is 1 byte).
Since ISO-8859-1 represents each code point in a byte, it can only encode 256 code points, the first 256 code points of the Unicode character set. UTF-8 can be used to encode most (if not all) code points of the UNICODE character set.
Code points 0 - 127 are encoded identically by the UTF-8 and ISO-8859-1 schemes. Code points 128 - 255 differ by becoming a 2-byte sequence with UTF-8 whereas they are single bytes with ISO-8859-1.
So, if an ISO-8859-1 encoded file contains any code point from 128-255, then it will be a different size than a UTF-8 encoded file that contains the same code points.