Using ternary logic to add a class to a tag.