| 5:12 am on Aug 1, 2013 (gmt 0)|
welcome to WebmasterWorld, ChrisBang123!
it's best described in the official HTML language reference in section on HTML syntax:
| 2:58 am on Aug 2, 2013 (gmt 0)|
The short version of the docs is:
This is an HTML element <p>
[change p to any valid tag and it's still an element]
This is an element with an HTML attribute <p class="some_class">
[change class="some_class" to anything else valid for the element being used or add another attribute="value" and those are it's attribute(s)]
| 4:14 am on Aug 2, 2013 (gmt 0)|
attribute = "some-value"
| 1:18 pm on Aug 2, 2013 (gmt 0)|
|This is an HTML element <p> |
To nitpick. <p> is a tag that represents an element.
| 3:38 pm on Aug 2, 2013 (gmt 0)|
To nitpick. Some browsers have been known to have issues with
attribute[space]=[space]"value". It doesn't happen very often any more; I've only seen it a handful of times recently with empty attributes (i.e.
checked="checked"). In other words -- it's best to not use spaces around the equal sign (=) separating the attribute from its value. Makes HTML parsing or regular expressions much easier as well. I know that HTML5 explicitly allows space characters (which, IMO is a bad move), but I still recommend against it.
| 6:34 pm on Aug 2, 2013 (gmt 0)|
|To nitpick. <p> is a tag that represents an element. |
Okay, okay, okay -- How about 'Any valid tag is often loosely referred to as an element, even if the tag is not technically an element itself, while an attribute appears within a tag as attribute="value".'? (lol)