html: don't generate begin/end context events if styles is null