Content deleted Content added
ft "used inside the opening tag to control the element's behaviour. It is a piece of markup language used to adjust the behavior or display of an HTML element.HTML attributes are a modifier of a ''HTML element'' type." → "used to adjust the behavior or display of an ''HTML element''." Much of the previous text was either internally redundant or redundant given the rest of the introduction. |
Tags: Reverted Mobile edit Mobile web edit |
||
Line 16:
Where <code>element</code> names the HTML element type, and <code>attribute</code> is the name of the attribute, set to the provided <code>value</code>. The value may be enclosed in single or double quotes, although values consisting of certain characters can be left unquoted in HTML (but not XHTML).<ref>{{cite web|url=http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.2 |title=On SGML and HTML |publisher=World Wide Web Consortium |access-date=November 16, 2008}}</ref><ref>{{cite web|url=http://www.w3.org/TR/xhtml1/diffs.html#h-4.4|title=XHTML 1.0 – Differences with HTML 4|publisher=World Wide Web Consortium|access-date=November 16, 2008}}</ref> Leaving attribute values unquoted is considered unsafe.<ref>{{cite web|first=Jukka|last=Korpela|url=https://jkorpela.fi/qattr.html|title=Why attribute values should always be quoted in HTML|publisher=Cs.tut.fi |date=July 6, 1998|access-date=November 16, 2008}}</ref>
Although most attributes are provided as paired names and values, some affect the element simply by their presence in the start tag of the element<ref name="tagshtml Stephen chellingsworth">{{cite web|url=http://www.w3.org/History/19921103-hypertext/hypertext/WWW/MarkUp/Tags.html |title=Tags used in HTML |publisher=World Wide Web Consortium |date=November 3, 1992 |access-date=November 16, 2008}}</ref> (like the <code>ismap</code> attribute for the <code>img</code> element<ref>{{cite web|url=http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html#adef-ismap|title=Objects, Images, and Applets in HTML documents |publisher=World Wide Web Consortium |date=December 24, 1999|access-date=November 16, 2008}}</ref>).
The abbreviation element, <code>abbr</code>, can be used to demonstrate these various attributes:
|