HTML element text length helper