The Difference Between a Tag and an Element A Tag A tag is simply a less than sign (<), followed by a forward slash (/) if it’s a closing/ending tag, followed by a string of one or more pre-defined characters (a, li, body, etc), followed by a greater than sign (>). For example, the starting/opening […]
Category Archives: Differences
The Style Keyword: The Difference Between Tag and Attribute
Introduction The style keyword in HTML is special, because it’s both a tag (<style>) and an attribute (<p style=”color: red;”>). It’s easy to confuse the two, as each represents very different ideas. The style Tag When used as a tag and without the scoped attribute (discussed below), it must be included as a child of […]