ikramy I think this can work better than CSS.
If you don't mind me asking, why? When using fontawesome, the icon itself comes from CSS, so it would make sense for a custom solution to take the same approach. It's also quite simple and can be updated from the admin dashboard.
The tag icon is implemented via the tagIcon
util function, which can't be extended (since Flarum functions can't be overriden), so you'd have to override the entire components, which is a lot of work and code duplication. They aren't in those docs because they're defined in the flarum/tags
extension.