Syntax vs Element vs Tag vs attributes vs property vs selector?
css, html, javascript, xhtml
Solution
In:
#menu ul li {
display: inline;
}
we have:
- Selector: `#menu ul li`;
- Property: `display`;
- Property value: `inline`.
In:
<ul id="menu">...</ul>
we have:
- Element or Tag: `<ul>`;
- Attribute: `id`;
- Attribute value: `menu`.
Edit: Ok, to address this issue of tags vs elements.
Both the XML and HTML 4.01 specifications use the terms:
- Start Tag: `<ul>`;
- End Tag: `</ul>`; and
- Element `<ul>...</ul>`.
However, in colloquial usage, such distinctions are so rare that there are arguments about it. In normal use the terms are interchangeable even though that it not their precise definition.
Problem
Can anyone give me details on each? for example? Is #ID an attribute or property or selector or anchor? Is default property and default attributes are different thing? Are all these Tags or elements? What we will say to this ``` <img src="angry.gif" alt="Angry face" title="Angry face" /> ``` This ``` <div>.....</div> ``` and these `<br />` , `<hr />` Syntax , Tag or elements? Thanks in advance.