Unit testing HTMLTag class.
Some refactoring to make component more testable.
Small test changes.