Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
HTML element
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Document body elements== In visual browsers, displayable elements can be rendered as either ''block'' or ''inline''. While all elements are part of the document sequence, block elements appear within their parent elements: * as rectangular objects which do not break across lines; * with block margins, width, and height properties which can be set independently of the surrounding elements. Conversely, inline elements are treated as part of the flow of document text; they cannot have margins, width, or height set, and do break across lines. ===Block elements=== Block elements, or block-level elements, have a rectangular structure. By default, these elements will span the entire width of its parent element, and will thus not allow any other element to occupy the same horizontal space as it is placed on. The rectangular structure of a block element is often referred to as the [[:File: W3C and Internet Explorer box models.svg|box model]], and is made up of several parts. Each element contains the following: * The '''content''' of an element is the actual text (or other media) placed between the opening and closing tags of an element. * The '''padding''' of an element is the space around the content but which still forms part of the element. Padding should not be used to create white space between two elements. Any background style assigned to the element, such as a background image or color, will be visible within the padding. Increasing the size of an element's padding increases the amount of space this element will take up. * The '''border''' of an element is the absolute end of an element and spans the perimeter of that element. The thickness of a border increases the size of an element. * The '''margin''' of an element is the white space that surrounds an element. The content, padding, and border of any other element will not be allowed to enter this area unless forced to do so by some advanced [[CSS]] placement. Using most standard [[Document Type Definition|DTDs]], margins on the left and right of different elements will push each other away. Margins on the top or bottom of an element, on the other hand, will not stack or will intermingle. This means that the white space between these elements will be as big as the larger margin between them. The above section refers only to the detailed implementation of CSS rendering and has no relevance to HTML elements themselves. ====Basic text==== {{glossary}} {{term|term=p |content= {{XMLElement|p|Paragraph}} }} {{defn|1= Creates a paragraph, perhaps the most common block level element.}} {{defn|<code>P</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=h1 |content= {{XMLElement|h1|Level 1 heading}} {{anchor|heading}} }} {{term|term=h2 |content= {{XMLElement|h2|Level 2 heading}} |multi=y}} {{term|term=h3 |content= {{XMLElement|h3|Level 3 heading}} |multi=y}} {{term|term=h4 |content= {{XMLElement|h4|Level 4 heading}} |multi=y}} {{term|term=h5 |content= {{XMLElement|h5|Level 5 heading}} |multi=y}} {{term|term=h6 |content= {{XMLElement|h6|Level 6 heading}} |multi=y}} {{defn|1= Section headings at different levels. <code>h1</code> delimits the highest-level heading, <code>h2</code> the next level down (sub-section), <code>h3</code> for a level below that, and so on to <code>h6</code>. They are sometimes referred to collectively as <code>h''n''</code> tags, ''n'' meaning any of the available heading levels. Most visual browsers show headings as large bold text by default, though this can be overridden with [[Cascading Style Sheets|CSS]]. Heading elements are not intended merely for creating large or bold text β in fact, they should {{em|not}} be used for explicitly styling text. Rather, they describe the document's structure and organization. Some programs use them to generate outlines and tables of contents. }} {{defn|Headings existed in ''[[#HTMLTAGS|HTML Tags]]'', and were '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{glossary end}} ==== Lists ==== {{glossary}} {{anchor|dl}}{{term|term=dl |content= {{XMLElement|dl|Definition List}} }} {{defn|1= {{redirect|Definition list|Wikipedia's article on lists of definitions|Glossary}} A description list (a.k.a. [[association list]] or definition list) consists of nameβvalue groups,<ref name="W3C-5-DL">{{cite web |url=http://www.w3.org/TR/html5/grouping-content.html#the-dl-element |title=4.4 Grouping content β HTML5 |work=HTML5: A vocabulary and associated APIs for HTML and XHTML β W3C Recommendation |publisher=[[World Wide Web Consortium]] |at=Β§4.4.8 The dl element |date=28 October 2014 |access-date=16 August 2015}}</ref> and was known as a definition list prior to HTML5.<ref>{{cite web |url=http://www.w3.org/TR/html4/struct/lists.html#edef-DL |title=Lists in HTML documents |at=Β§10.3 Definition lists: the DL, DT, and DD elements |work=HTML 4.01 Specification β W3C Recommendation |date=24 December 1999 |publisher=World Wide Web Consortium |access-date=2 May 2015 }}</ref> Description lists are intended for groups of "terms and definitions, metadata topics and values, questions and answers, or any other groups of nameβvalue data".<ref>{{cite web |website=[[W3C]]|title=HTML5: A Vocabulary and Associated APIs for HTML and XHTML, W3C Working Draft|date=5 April 2011|url=http://www.w3.org/TR/2011/WD-html5-20110405/grouping-content.html#the-dl-element}}.</ref> }} {{defn|<code>DL</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=dt |content= {{XMLElement|dt|Definition Term}} }} {{defn|1= A name in a description list (previously definition term in a definition list).}} {{defn|<code>DT</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=dd |content= {{XMLElement|dd|Definition}} }} {{defn|1= A value in a description list (previously definition data in a definition list).}} {{defn|<code>DD</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=ol |content= {{XMLElement|ol|Ordered List}} }} {{defn|1= An ordered (enumerated) list. The <code>type</code> attribute can be used to specify the kind of marker to use in the list, but style sheets give more control. The default is Arabic numbering. In an HTML attribute: {{nobr|{{code|lang=html|code=<ol type="foo">}}}}; or in a CSS declaration: {{nobr|{{code|lang=css|code=ol { list-style-type: foo; } }}}} β replacing <code><var>foo</var></code> with one of the following: * A, B, C ... β HTML value: <code>A</code>; CSS value: <code>upper-alpha</code> * a, b, c ... β HTML value: <code>a</code>; CSS value: <code>lower-alpha</code> * I, II, III ... β HTML value: <code>I</code>; CSS value: <code>upper-roman</code> * i, ii, iii ... β HTML value: <code>i</code>; CSS value: <code>lower-roman</code> * 1, 2, 3 ... β HTML value: <code>1</code>; <code>decimal</code> CSS provides several other options not available as pure-HTML markup, including <code>none</code>, and options for [[CJK]], Hebrew, Georgian, and Armenian script. The attribute is deprecated in HTML 3.2 and 4.01, but not in HTML 5. }} {{defn|<code>OL</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=ul |content= {{XMLElement|ul|Unordered List}} }} {{defn|1= An unordered (bulleted) list. The type of list item marker can be specified in an HTML attribute: {{nobr|{{code|lang=html|code=<ul type="foo">}}}}; or in a CSS declaration: {{nobr|{{code|lang=css|code=ul { list-style-type: foo; } }}}} β replacing <code><var>foo</var></code> with one of the following (the same values are used in HTML and CSS): <code>disc</code> (the default), <code>square</code>, or <code>circle</code>. '''Only''' the CSS method is supported in HTML5; the attribute is deprecated in HTML 3.2 and 4.01. CSS also provides <code>none</code>, and the ability to replace these bullets with custom images.}} {{defn|<code>UL</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=li |content= {{XMLElement|li|List Item}} }} {{defn|1= A list item in ordered (<code>ol</code>) or unordered (<code>ul</code>) lists.}} {{defn|<code>LI</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=dir |content= {{XMLElement|dir|Directory List|deprecated=1}} }} {{defn|1= A directory listing. The original purpose of this element was never widely supported; deprecated in favor of {{code|lang=html|code=<ul>}}.}} {{defn|<code>DIR</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; '''deprecated''' in [[#HTML401|HTML 4.0 Transitional]]; '''invalid''' in [[#HTML401|HTML 4.0 Strict]].}} {{glossary end}} ==== Other block elements ==== <!--linked from Template:Pre2--> {{glossary}} {{term|term=address |content= {{XMLElement|address|Address}} }} {{defn|1= Contact information for the document author.}} {{defn|<code>ADDRESS</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=article |content= {{XMLElement|article|Article}} }} {{defn|1= {{Main|Article element}} Used for articles and other similar content. }} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=aside |content= {{XMLElement|aside|Aside}} }} {{defn|1= Used for content in a document which is separate from the main page content, for example, sidebars or advertising.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=blockquote |content= {{XMLElement|blockquote|BlockQuotation}}<!-- Linked from [[Wikipedia:Quotations]] --> }} {{defn|1= {{Main|Blockquote element}} A [[blockquote|block level quotation]], for when the quotation includes block level elements, e.g. paragraphs. The <code>cite</code> attribute (not to be confused with the [[#cite|{{tag|cite|o}}]] element) may give the source, and must be a fully qualified [[Uniform Resource Identifier]]. The default presentation of block quotations in visual browsers is usually to indent them from both margins. This has led to the element being unnecessarily used just to indent paragraphs, regardless of semantics. For quotations not containing block level elements see the quote ([[#q|{{tag|q|o}}]]) element. }} {{defn|<code>BLOCKQUOTE</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current. See [[blockquote element]] for more information.}} {{term|term=center |content= {{XMLElement|center|Centered Text|deprecated=1}} }} {{defn|1= Creates a block-level center-aligned division. Deprecated in favor of [[#div|{{tag|div|o}}]] or another element with centering defined using style sheets.}} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; '''deprecated''' in [[#HTML401|HTML 4.0]]; '''not supported''' in [[#HTML5|HTML5]].}} {{term|term=del |content= {{XMLElement|del|Deleted Section}} }} {{defn|1= Marks a deleted section of content. This element can also be used as ''inline''.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=div |content= {{XMLElement|div|Logical division}} }} {{defn|1= {{Main|Span and div}} A block-level logical division. A generic element with no semantic meaning used to distinguish a document section, usually for purposes such as presentation or behavior controlled by [[Cascading Style Sheets|style sheets]] or [[Document Object Model|DOM]] calls.}} {{defn|Proposed in the [[#HTML30|HTML 3.0 Drafts]]; '''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=figure |content= {{XMLElement|figure|Figure}} }} {{defn|1= Used to group images and captions, along with {{tag|figcaption|o}}.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=figcaption |content= {{XMLElement|figcaption|Figure Caption}} }} {{defn|1= A caption for an image. Always placed inside the {{tag|figure|o}} element.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=footer |content= {{XMLElement|footer|Footer}} }} {{defn|1= Used for document footers. These might contain author or copyright information, or links to other pages.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=header |content= {{XMLElement|header|Header}} }} {{defn|1= Used for document headers. These typically contain content introducing the page.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=hr |content= {{XMLElement|hr|Thematic break|end=no}} }} {{defn|1= A [[thematic break (formatting)|thematic break]] (originally: horizontal rule). Presentational rules can be drawn with style sheets.}} {{defn|'''Standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=ins |content= {{XMLElement|ins|Inserted Section}} }} {{defn|1= Marks a section of inserted content. This element can also be used as ''inline''.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=main |content= {{XMLElement|main|Main Content}} }} {{defn|1= Contains the main content of a document.}} {{defn|'''Standardized''' in [[#HTML5|HTML 5.1]].}} {{term|term=menu |content= {{XMLElement|menu|Menu}} }} {{defn|1= HTML 2.0: A menu listing. Should be more compact than a {{tag|ul|o}} list.}} {{defn|<code>MENU</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; '''deprecated''' in [[#HTML401|HTML 4.0 Transitional]]; '''invalid''' in [[#HTML401|HTML 4.0 Strict]]; then redefined in [[#HTML5|HTML5]], removed in HTML 5.2, but is included in the HTML Living Standard in 2019. }} {{term|term=nav |content= {{XMLElement|nav|Navigation}} }} {{defn|1= Used in navigational sections of articles (areas of webpages which contain links to other webpages).}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=noscript |content= {{XMLElement|noscript|JavaScript Fallback}} }} {{defn|1= Replacement content for scripts. Unlike '''script''' this can only be used as a block-level element.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=pre |content= {{XMLElement|pre|PreFormatted Text}} }} {{defn|1= ''Pre-formatted'' text. Text within this element is typically displayed in a [[non-proportional font]] exactly as it is laid out in the file (see [[ASCII art]]). Whereas browsers ignore [[Whitespace (computer science)|white-space]] for other HTML elements, in {{tag|pre}}, white-space should be rendered as authored. (With the CSS properties: {{code|lang=css|code={ white-space: pre; font-family: monospace; }<nowiki />}}, other elements can be presented in the same way.) This element can contain any inline element except: [[#image|{{tag|image|o}}]], [[#object|{{tag|object|o}}]], [[#big|{{tag|big|o}}]], [[#small|{{tag|small|o}}]], [[#sup|{{tag|sup|o}}]], and [[#sub|{{tag|sub}}]].}} {{defn|<code>PRE</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=section |content= {{XMLElement|section|Section}} }} {{defn|1= Used for generic sections of a document. This is different from [[#div|{{tag|div|o}}]] in that it is only used to contain sections of a page, which the W3C defines as a group of content with a similar theme.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=script |content= {{XMLElement|script|Script}} }} {{defn|1= Places a script in the document. Also usable in the head and in inline contexts. It may be used as {{tag|script|s}} with a <code>src</code> attribute to supply a URL from which to load the script, or used as {{tag|script}} around embedded script content. {{strong|Note:}} {{tag|script|o}} is not itself either a block or inline element; by itself it should not display at all, but it can contain instructions to dynamically generate either both block or inline content.}} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{glossary end}} ===Inline elements=== Inline elements cannot be placed directly inside the {{code|lang=html|code=<body>}} element; they must be wholly nested within block-level elements.<ref>{{citation|url=http://www.w3.org/TR/html401/struct/global.html#h-7.5.1 |title=HTML 4.01 |publisher=W3C |access-date=2012-03-26}}</ref> ====Anchor==== {{for|anchors on Wikipedia|WP:ANCHOR DEF|selfref=true}} {{glossary}} {{term|term=a |content= {{XMLElement|a|Anchor}} }} {{defn|1= <p>An anchor element is called an anchor because web designers can use it to "anchor" a URL to some text on a web page. When users view the web page in a browser, they can click the text to activate the link and visit the page whose URL is in the link.<ref>{{cite book |last1= Tittel |first1= Ed |last2= Burmeister |first2= Mary C. |date= 2005 |title= HTML 4 for dummies |edition= 5th |publisher= Wiley |location= Hoboken, New Jersey |isbn= 978-0-7645-8917-1 |page= 96 |url= https://archive.org/details/html4fordummies00titt_2/page/96/ |url-access= registration |access-date= 7 August 2022}}</ref></p> <p>In HTML, an "anchor" can be either the {{em|origin}} (the [[anchor text]]) or the {{em|target}} (destination) end of a [[hyperlink]]. As an origin, setting the attribute <code>href</code>,<ref>{{cite web|url=http://www.w3.org/Provider/ServerWriter.html|title=ServerWriter -- /Provider|website=W3C}}</ref> creates a hyperlink; it can point to either another part of the document or another resource (e.g. a webpage) using an external [[Uniform Resource Locator|URL]]. As a target, setting the <code>name</code> or <code>id</code> [[HTML attributes]], allows the element to be linked from a [[Uniform Resource Locator]] (URL) via a [[fragment identifier]]. The two forms, origin and anchor, can be used concurrently.</p> In HTML5, any element can now be made into a target by using the <code>id</code> attribute,<ref>{{cite web|url=http://www.w3.org/tr/html5/index.html#attributes-1|title=HTML 5.2|website=W3C}}</ref> so using {{code|lang=html|code=<a name="foo">...</a>}} is not necessary, although this way of adding anchors continues to work.</p> <p>To illustrate: the header of a table of contents section on <samp>example.com</samp>'s homepage could be turned into a target by writing: {{code|lang=html|code=<h2><a name="contents">Table of contents</a></h2>}}.</p> <p>Continuing with this example, now that the section has been marked up as a target, it can be referred to from external sites with a link like: {{code|lang=html|code=<a href="http://example.com#contents">see contents</a>}};</p> <p>or with a link on the same page like: {{code|lang=html|code=<a href="#contents">contents, above</a>}}.</p> <p>The attribute <code>title</code> may be set to give brief information about the link: {{code|lang=html|code=<a href="URL" title="additional information">link text</a>}}.</p> <p>In most graphical browsers, when the cursor hovers over a link, the cursor changes into a hand with an extended index finger and the <code>title</code> value is displayed in a [[tooltip]] or in some other manner. Some browsers render [[Alt attribute|alt text]] the same way, although this is not what the specification calls for.</p> }} {{defn|<code>A</code> existed in ''[[#HTMLTAGS|HTML Tags]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]];}} {{glossary end}} ====Phrase elements==== Phrase elements are used for marking up phrases and adding structure or semantic meaning to text fragments. For example, the {{tag|em|o}} and {{tag|strong|o}} tags can be used for adding emphasis to text. =====General===== {{glossary}} {{term|term=abbr |content= {{XMLElement|abbr|Abbreviation}} }} {{defn|1= Marks an [[abbreviation]], and can make the full form available: {{code|lang=html|code=<abbr title="abbreviation">abbr.</abbr>}}}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=acronym |content= {{XMLElement|acronym|Acronym|deprecated=1}} }} {{defn|1= Similar to the {{code|lang=html|code=<abbr>}} element, but marks an [[acronym]]: {{code|lang=html|code=<acronym title="Hyper-Text Mark-up Language">HTML</acronym>}}}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current, '''not supported''' in [[#HTML5|HTML5]]. Recommended replacement is the <code>abbr</code> tag.<ref>[https://www.w3schools.com/tags/tag_acronym.asp Acronym tag], acronym.</ref>}} {{term|term=dfn |content= {{XMLElement|dfn|Definition}} }} {{defn|1= Inline definition of a single term.}} {{defn|<code>DFN</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was fully '''standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=em |content= {{XMLElement|em|Emphasis}} }} {{defn|1= <em>Emphasis</em> (conventionally displayed in italics)}} {{defn|<code>EM</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=strong |content= {{XMLElement|strong|Importance}} }} {{defn|1= <strong>importance</strong>; originally strong emphasis (conventionally displayed bold). An [[voice browser|aural user agent]] may use different voices for emphasis. }} {{defn|<code>STRONG</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current, redefined in HTML5.}} {{glossary end}} =====Computer phrase elements===== These elements are useful primarily for documenting computer code development and user interaction through differentiation of source code ({{code|lang=html|code=<code>}}), variables ({{code|lang=html|code=<var>}}), user input ({{code|lang=html|code=<kbd>}}), and terminal or other output ({{code|lang=html|code=<samp>}}). {{glossary}} {{term|term=code |content= {{XMLElement|code|Sourcecode}} }} {{defn|1= A code snippet (<code>code example</code>). Conventionally rendered in a mono-space font.}} {{defn|<code>CODE</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=kbd |content= {{XMLElement|kbd|Keyboard}} }} {{defn|1= Keyboard β text to be entered by the user (<kbd>kbd example</kbd>).}} {{defn|<code>KBD</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=samp |content= {{XMLElement|samp|Sample}} }} {{defn|1= Sample output β from a program or script: (<samp>samp example</samp>).}} {{defn|<code>SAMP</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=var |content= {{XMLElement|var|Variable}} }} {{defn|1= Variable (<var>var example</var>).}} {{defn|<code>VAR</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{glossary end}} ====Presentation==== As visual presentational markup only applies directly to visual browsers, its use is discouraged. Style sheets should be used instead. Several of these elements are deprecated or invalid in HTML 4 / XHTML 1.0, and the remainder are invalid in the current draft of [http://www.w3.org/TR/2005/WD-xhtml2-20050527/ XHTML 2.0]. The current draft of [https://web.archive.org/web/20150801133040/http://www.w3.org/TR/html5/text-level-semantics.html HTML5], however, re-includes {{tag|s|o}}, {{tag|u|o}}, and {{tag|small|o}}, assigning new semantic meaning to each. In an [[HTML5]] document, the use of these elements is no longer discouraged, provided that it is semantically correct. {{term|term=b |content= {{XMLElement|b|Keyword}} }} {{defn|1= <!-- not deprecated in [[HTML 4.01]]; not included in [[XHTML 2.0]] which is in draft stage; now a semantic element in [[HTML5]] --> In [[HTML 4]], set font to '''boldface''' where possible. Equivalent CSS: {{code|lang=css|code={ font-weight: bold; } }}. The {{tag|strong|o}} element usually has the same effect in visual browsers, as well as having more semantic meaning, under [[HTML 4.01]]. In [[HTML5]], however, {{tag|b|o}} has its own meaning, distinct from that of {{tag|strong|o}}. It denotes "text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood."<ref name="html5-b-element">{{citation|url=http://developers.whatwg.org/text-level-semantics.html#the-b-element |title=4.6 Text-level semantics β The b element |publisher=Developers.whatwg.org |access-date=2012-03-26}}</ref> }} {{defn|<code>B</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current, redefined in HTML5.}} {{term|term=i |content= {{XMLElement|i|Alternate voice}} }} {{defn|1= <!-- not deprecated in HTML 4.01; not included in XHTML 2.0 which is in draft stage; now a semantic element in HTML5 --> In [[HTML 4]], set font to ''italic'' where possible. Equivalent [[CSS]]: {{code|lang=css|code={ font-style: italic; } }}. Using {{tag|em}} has the same visual effect in most browsers, as well as having a semantic meaning as ''emphasis'', under [[HTML 4.01]]. (Purely typographic italics have many non-emphasis purposes, as HTML 5 more explicitly recognized.) In [[HTML5]], however, {{tag|i|o}} has its own semantic meaning, distinct from that of {{tag|em|o}}. It denotes "a different quality of text" or "an alternate<!--sic--> voice or mood" e.g., a thought, a ship name, a [[Binomial nomenclature|binary species name]], a foreign-language phrase, etc.<!-- Not (or no longer) a precise quote, so don't put this in quotation marks --><ref name="html5-i-element">{{citation|url=http://developers.whatwg.org/text-level-semantics.html#the-i-element |title=4.6 Text-level semantics β The i element |publisher=Developers.whatwg.org |access-date=2012-03-26}}</ref> }} {{defn|<code>I</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current, redefined in HTML5.}} {{term|term=u |content= {{XMLElement|u|Unarticulated annotation}} }} {{defn|1= In [[HTML 4]], <u>underlined</u> text. Equivalent CSS: {{code|lang=css|code={ text-decoration: underline; } }}. Deprecated in [[HTML 4.01]]. Restored in [[#HTML5|HTML5]]. In [[HTML5]], the {{tag|u|o}} element denotes "a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labelling the text as being a proper name in Chinese text (a Chinese proper name mark), or labelling the text as being misspelt." The [[HTML5]] specification reminds developers that other elements are almost always more appropriate than {{tag|u|o}} and admonishes designers not to use underlined text where it could be confused for a hyper-link.<ref name="html5-u-element">{{citation|url=http://developers.whatwg.org/text-level-semantics.html#the-u-element |title=4.6 Text-level semantics β The u element |publisher=Developers.whatwg.org |access-date=2012-03-26}}</ref> }} {{defn|<code>U</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', was '''standardized''' in [[#HTML32|HTML 3.2]] but was '''deprecated''' in [[#HTML401|HTML 4.0 Transitional]] and was '''invalid''' in [[#HTML401|HTML 4.0 Strict]]. '''Reintroduced''' in [[#HTML5|HTML5]].}} {{term|term=small |content= {{XMLElement|small|Side comment}} }} {{defn|1= In [[HTML 4]], decreased font size (<small>smaller</small> text). Equivalent CSS: {{code|lang=css|code={ font-size: smaller; } }} In [[HTML5]], the {{tag|small|o}} element denotes "side comments such as small print."<ref name="html5-small-element">{{citation|url=http://developers.whatwg.org/text-level-semantics.html#the-small-element |title=4.6 Text-level semantics β The small element |publisher=Developers.whatwg.org |access-date=2012-03-26}}</ref> This has caused some confusion with the {{tag|[[#aside|aside]]}} element. }} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=s |content= {{XMLElement|s|Inacurrate text}} }} {{defn|1= In [[HTML 4]], indicated strike-through text (<s>Strikethrough</s>) and was equivalent to {{tag|strike|o}}. In [[HTML5]], the {{tag|s|o}} element denotes information that is "no longer accurate or no longer relevant", and is not to be confused with {{tag|del|o}}, which indicates removal/deletion.<ref name="html5-s-element">{{citation|url=http://developers.whatwg.org/text-level-semantics.html#the-s-element |title=4.6 Text-level semantics β The s element |publisher=Developers.whatwg.org |access-date=2012-03-26}}</ref> }} {{defn|<code>S</code> was '''deprecated''' in [[#HTML401|HTML 4.0 Transitional]] (having not appeared in any previous standard), and was '''invalid''' in [[#HTML401|HTML 4.0 Strict]]. '''Reintroduced''' in [[#HTML5|HTML5]], which instead deprecated {{tag|strike|o}}.}} {{term|term=big |content= {{XMLElement|big|Big|deprecated=1}} }} {{defn|1= Increased font size (<big>bigger</big> text). Equivalent CSS: {{code|lang=css|code={ font-size: larger; } }}}} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; '''not supported''' in [[#HTML5|HTML5]].}} {{term|term=strike |content= {{XMLElement|strike|Strikethrough|deprecated=1}} }} {{defn|1= Strike-through text (<s>Strikethrough</s>), (Equivalent CSS: {{code|lang=css|code={ text-decoration: line-through; } }})}} {{defn|<code>STRIKE</code> was standardized in [[#HTML32|HTML 3.2]]; '''deprecated''' in [[#HTML401|HTML 4.0 Transitional]]; '''invalid''' in [[#HTML401|HTML 4.0 Strict]].}} {{term|term=tt |content= {{XMLElement|tt|Teletype|deprecated=1}} }} {{defn|1= [[non-proportional font|Fixed-width]] font ({{mono|typewriter-like}}<!-- DO NOT use actual deprecated markup in this page; use CSS to simulate its output.-->), also known as [[Teleprinter|teletype]], thus "tt". (Equivalent CSS: {{code|lang=css|code={ font-family: monospace; } }})}} {{defn|<code>TT</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''Standardized''' in [[#HTML20|HTML 2.0]]; not supported<ref name="html5-tt-not-supported">{{citation|url=http://www.w3.org/TR/html5/obsolete.html#non-conforming-features |title=11 Obsolete features β HTML5 |publisher=W3C |access-date=2012-03-26}}</ref> in HTML5. Possible replacements: [[#kbd|{{tag|kbd|o}}]] for marking user input, [[#var|{{tag|var|o}}]] for variables (usually rendered italic, and not with a change to monospace), [[#code|{{tag|code|o}}]] for source code, [[#samp|{{tag|samp|o}}]] for output.<ref name="html5-tt-not-supported" />}} {{term|term=font |content= {{XMLElement|font|Font|deprecated=1}} }} {{defn|1= {{code|lang=html|code=<font [color=<var>color</var>] [size=<var>size</var>] [face=<var>face</var>]>...</font>}} Can specify the font color with the <code>color</code> attribute (note the American spelling), typeface with the <code>face</code> attribute, and absolute or relative size with the <code>size</code> attribute. Examples (all uses are deprecated, use CSS equivalents if possible): * {{code|lang=html|code=<font color="green">text</font>}} creates {{green|green text}}. * {{code|lang=html|code=<font color="#114499">text</font>}} creates <span style="color:#149;">text with [[Hex triplet|hexadecimal color]] #114499</span>. * {{code|lang=html|code=<font size="4">text</font>}} creates <span style="font-size:140%;">text</span> with size 4. Sizes are from 1 to 7. The standard size is 3, unless otherwise specified in the <body> or other tags. * {{code|lang=html|code=<font size="+1">text</font>}} creates <span style="font-size:125%;">text with size 1 bigger than the standard.</span> {{code|lang=html|code=<font size="-1">text</font>}} is opposite. * {{code|lang=html|code=<font face="Courier">text</font>}} makes <span style="font-family:Courier;">text</span> with Courier font. Equivalent CSS for font attributes: *<code class="mw-highlight"><span class="p"><</span><span class="nt">font</span> <span class="na">size</span><span class="o">=</span><span class="s">"<var>N</var>"</span><span class="p">></span></code> corresponds to <code class="mw-highlight"><span class="p">{</span><span class="nb">font-size</span><span class="o" style="color: #666;">:</span> <span class="nb"><var>Y</var><var>units</var></span><span class="p">}</span></code> (the HTML specification does not define the relationship between size <var>N</var> and unit-size <var>Y</var>, nor does it define a unit). *{{code|lang=html|code=<font color="red">}} corresponds to {{code|lang=css|code={ color: red; } }} *{{code|lang=html|code=<font face="Times New Roman">}} corresponds to {{code|lang=css|code={ font-family: 'Times New Roman', Times, serif; } }} β CSS supports a [[font stack]], of two or more alternative fonts. }} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; '''deprecated''' in [[#HTML401|HTML 4.0 Transitional]]; '''invalid''' in [[#HTML401|HTML 4.0 Strict]]. Not part of HTML5.}} ====Span==== {{glossary}} {{term|term=span |content= {{XMLElement|span|Span}} }} {{defn|1= {{Main|Span and div}} An inline logical division. A generic element with no semantic meaning used to distinguish a document section, usually for purposes such as presentation or behavior controlled by [[Cascading Style Sheets|style sheets]] or [[Document Object Model|DOM]] calls. }} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{glossary end}} ====Other inline elements==== {{glossary}} {{term|term=br |content= {{XMLElement|br|Line Break|end=no}} }} {{defn|1= A forced line break.}} {{defn|'''Standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=bdi |content= {{XMLElement|bdi|Bidirectional Isolation}} }} {{defn|1= Isolates an inline section of text that may be formatted in a different direction from other text outside of it, such as user-generated content with unknown directionality.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=bdo |content= {{XMLElement|bdo|Bidirectional Override}} }} {{defn|1= Marks an inline section of text in which the reading direction is the opposite from that of the parent element.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=cite |content= {{XMLElement|cite|Citation}} }} {{defn|1= A citation or a reference for a quote or statement in the document.}} {{defn|CITE existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{defn|''Note:'' The HTML 5 specifications have been confusingly [[Fork (software development)|forked]],<ref name=finalars>{{cite web |url= https://arstechnica.com/information-technology/2014/10/html5-specification-finalized-squabbling-over-who-writes-the-specs-continues/ |title=HTML5 specification finalized, squabbling over specs continues |publisher=Ars Technica |date=29 October 2014 |access-date=29 October 2014}}</ref> including with regard to this element. In HTML 4 and earlier, {{tag|cite|o}} was for "a citation or a reference to other sources" without any particular limitations or requirements.<ref>{{cite web |title=9.2.1 Phrase elements: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR, and ACRONYM |work=HTML 4.01 Specification |date=24 December 1999 |publisher=[[W3C]] |url= https://www.w3.org/TR/html401/struct/text.html#h-9.2.1 |access-date=26 July 2018}}</ref> The [[W3C]] HTML 5 spec uses a refinement of this idea, reflecting how the element has historically been used, but now requiring that it contain (but not be limited to) at least one of "the title of the work or the name of the author (person, people or organization) or an URL reference, or a reference in abbreviated form as per the conventions used for the addition of citation metadata."<ref>[[#HTML52|''HTML 5.2 W3C Recommendation'']], at [https://www.w3.org/TR/html52/textlevel-semantics.html#the-cite-element "Β§4.5.6. The cite element"].</ref> But the WHATWG spec only permits the element to be used around the title of a work.<ref>[[#WHATWGLS|''HTML Living Standard'']], at [https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-cite-element "Β§4.5.6 The cite element"].</ref> The W3C specs began with the broader definition, then switched to the very narrow one after WHATWG made this change. However, W3C reverted their own change in 2012, in response to negative developer-community feedback; the element was in broadly-deployed use with the broader scope, e.g., various blog and forum platforms wrap commenters' IDs and e-mail addresses in {{tag|cite}}, and people using the element for bibliographic citations were (and still are) routinely wrapping each entire citation in this element. Another problem with the element is that WHATWG recommends that it be italicized by default (thus almost all browsers do so), because it (in their view) is only for publication titles. By convention, however, only certain kinds of titles actually take italics, while others are expected to be put in quotation marks, and standards may actually vary by publishing context and language. Consequently, many website authors and admins use a site-wide stylesheet to undo this element's auto-italics. }} {{term|term=data |content= {{XMLElement|data|Data}} }} {{defn|1= Links inline content with a machine-readable translation.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data|title=<data>|website=MDN Web Docs}}</ref>}} {{term|term=del |content= {{XMLElement|del|Deleted}} }} {{defn|1= Deleted text. Typically rendered as a [[strikethrough]]: <del>Deleted text.</del>}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=ins |content= {{XMLElement|ins|Inserted}} }} {{defn|1= Inserted text. Often used to mark up replacement text for material struck with {{tag|del|o}} or {{tag|s|o}}. Typically rendered [[underline]]d: <ins>Inserted text.</ins>}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{defn|Both {{tag|ins|o}} and {{tag|del|o}} elements may also be used as block elements: containing other block and inline elements. However, these elements must still remain wholly within their parent element to maintain a well-formed HTML document. For example, deleting text from the middle of one paragraph across several other paragraphs and ending in a final paragraph would need to use three separate {{tag|del|o}} elements. Two {{tag|del|o}} elements would be required as inline elements to indicate the deletion of text in the first and last paragraphs, and a third, used as a block element, to indicate the deletion in the intervening paragraphs.}} {{term|term=mark |content= {{XMLElement|mark|Mark}} }} {{defn|1= Produces text that looks <mark>like this</mark>. Intended for highlighting relevant text in a quotation.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=q |content= {{XMLElement|q|Quote}} }} {{defn|1= An inline quotation (for block level quotation see {{tag|[[#blockquote|blockquote]]|o}}). Quote elements may be nested. {{tag|q|o}} {{em|should}} automatically generate quotation marks in conjunction with style sheets. Practical concerns due to browser non-compliance may force authors to find workarounds. The <code>cite</code> attribute gives the source, and must be a fully qualified [[Uniform Resource Identifier|URI]]. }} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{defn|{{strong|Note:}} Lengthy inline quotations may be displayed as indented blocks (as <code>block-quote</code>) using style sheets. For example, with a suitable CSS rule associated with <code>q.lengthy</code>: {{tag|q|attribs=class="lengthy" |content=Lengthy quote here.}}}} {{term|term=rb |content= {{XMLElement|rb|Ruby Annotation Base}} }} {{defn|1= Represents the base component of a [[Ruby character|ruby annotation]].}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=http://www.quackit.com/html/tags/html_rb_tag.cfm|title=HTML <rb> Tag|website=www.quackit.com}}</ref>}} {{term|term=rp |content= {{XMLElement|rp|Ruby Fallback Parenthesis}} }} {{defn|1= Provides fallback parenthesis for browsers lacking [[Ruby character|ruby annotation]] support.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp|title=<rp>: The Ruby Fallback Parenthesis element|website=MDN Web Docs}}</ref>}} {{term|term=rt |content= {{XMLElement|rt|Ruby Annotation Pronunciation}} }} {{defn|1= Indicates pronunciation for a character in a [[Ruby character|ruby annotation]].}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt|title=<rt>: The Ruby Text element|website=MDN Web Docs}}</ref>}} {{term|term=rtc |content= {{XMLElement|rtc|Ruby Semantic Annotation}} }} {{defn|1= Semantic annotations for a [[Ruby character|ruby annotation]].}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rtc|title=<rtc>: The Ruby Text Container element|website=MDN Web Docs}}</ref>}} {{term|term=ruby |content= {{XMLElement|ruby|Ruby Annotation}} }} {{defn|1= Represents a [[Ruby character|ruby annotation]] for showing the pronunciation of East Asian characters.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby|title=<ruby>|website=MDN Web Docs}}</ref>}} {{term|term=script |content= {{XMLElement|script|Script}} }} {{defn|1= Places a [[scripting language|script]] in the document. Also usable in the head and in block contexts. {{em|Note:}} {{tag|script|o}} is not itself either a block or inline element; by itself it should not display at all, but it can contain instructions to dynamically generate either both block or inline content. }} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=sub |content= {{XMLElement|sub|Subscript}} }} {{term|term=sup |content= {{XMLElement|sup|Superscript}} |multi=y}} {{defn|1= Mark <sub>[[subscript]]ed</sub> or <sup>[[superscript]]ed</sup> text. (Equivalent CSS: {{code|lang=css|code={ vertical-align: sub; } }} and {{code|lang=css|code={ vertical-align: super; } }}, respectively.)}} {{defn|Both were proposed in the [[#HTML30|HTML 3.0 Drafts]]; '''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=template |content= {{XMLElement|template|Template}} }} {{defn|1= Code fragments to be copied by scripts.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template|title=<template>|website=MDN Web Docs}}</ref>}} {{term|term=time |content= {{XMLElement|time|Time}} }} {{defn|1= Represents a time on the 24-hour clock or a date on the [[Gregorian calendar]], optionally with time and time zone information. Also allows times and dates to be represented in a machine-readable format.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time|title=<time>|website=MDN Web Docs}}</ref>}} {{term|term=wbr |content= {{XMLElement|wbr|Word Break Opportunity|end=no}} }} {{defn|1= An optional word break.}} {{defn|Was widely used (and supported by all major browsers){{Citation needed|date=September 2023}} for years{{Clarify timeframe|date=September 2023}} despite being non-standard until finally being '''standardized''' in [[#HTML5|HTML5]].<ref>{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr|title=<wbr>|website=MDN Web Docs}}</ref>}} {{glossary end}} ===Images and objects=== {{Update section|reason=How do current browsers handle <applet>? What does HTML 5 say about it?|date=July 2023}} {{glossary}} {{term|term=applet |content= {{XMLElement|applet|Java Applet|deprecated=xhtml}} }} {{defn|1= Embeds a [[Java applet]] in the page. Deprecated in favor of {{tag|object|o}}, as it could only be used with Java applets, and had accessibility limitations.}} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; '''deprecated''' in [[#HTML401|HTML 4.0 Transitional]]; '''invalid''' in [[#HTML401|HTML 4.0 Strict]]. As of 2011, still widely used as the implementations of the replacing {{tag|object|o}} are not consistent between different browsers.}} {{term|term=area |content= {{XMLElement|area|Area|end=no}} }} {{defn|1= Specifies a [[Focus (computing)|focusable]] area in a {{tag|map|o}}.}} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=audio |content= {{XMLElement|audio|Audio}} }} {{defn|1= Adds playable [[HTML audio]] to the page. The audio URL is determined using the <code>src</code> attribute. Supported audio formats vary from browser to browser.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=canvas |content= {{XMLElement|canvas|Canvas}} }} {{defn|1= {{Main|Canvas element}} Adds a canvas whose contents can be edited with [[JavaScript]]. Frequently used for online games.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=embed |content= {{XMLElement|embed|Embed}} }} {{defn|1= Inserts a non-standard object (like applet) or external content (typically non-HTML) into the document.}} {{defn|Deprecated in HTML 4 in favor of {{tag|object|o}}, but then was added back into the HTML5 specification<ref>[http://webdesign.about.com/od/htmltags/p/bltags_embed.htm Jennifer Kyrnin ] {{Webarchive|url=https://web.archive.org/web/20121102014318/http://webdesign.about.com/od/htmltags/p/bltags_embed.htm |date=2012-11-02 }} {{tag|embed|o}}</ref><ref>[https://www.w3schools.com/tags/tag_embed.asp W3Schools] about {{tag|embed|o}}</ref>}} {{term|term=img |content= {{XMLElement|img|Image|end=no}} }} {{defn|1= Used by visual user agents to insert an [[image]] in the document. The <code>src</code> attribute specifies the image URL. The required [[Alt attribute|<code>alt</code> attribute]] provides alternative text in case the image cannot be displayed.<ref>The alt attribute's text cannot be styled with markup; as a result, other methods of alternative text presentation, such as [[Fahrner Image Replacement]], have been devised to accommodate situations in which the coder wishes styled text to be displayed if images are disabled in a user's browser.</ref> (Though <code>alt</code> is intended as alternative text, Microsoft [[Internet Explorer]] 7 and below render it as a [[tooltip]] if no <code>title</code> attribute is given.<ref>{{cite web | url=http://msdn.microsoft.com/en-us/library/cc288472.aspx#access | title=What's New in Internet Explorer 8 β Accessibility and ARIA | publisher=Microsoft | website=[[Microsoft Developer Network|MSDN]] | access-date=2009-07-22}}</ref> [[Safari (web browser)|Safari]] and [[Google Chrome]], on the other hand, do not display the alt attribute at all.)<ref>{{citation|url=https://bugs.webkit.org/show_bug.cgi?id=5566 |title=Bug 5566 β ALT attribute value sometimes not displayed when image is missing |publisher=Bugs.webkit.org |access-date=2012-03-26}}</ref> The {{tag|img|s}} element was first proposed by [[Marc Andreessen]] and implemented in the [[Mosaic (web browser)|NCSA Mosaic]] web browser.<ref>{{citation|url=http://1997.webhistory.org/www.lists/www-talk.1993q1/0182.html |title=WWW-Talk Jan-Mar 1993: proposed new tag: IMG |publisher=1997.webhistory.org |access-date=2012-03-26}}</ref>}} {{defn|<code>IMG</code> existed in ''[[#HTMLDRAFT12|HTML Internet Draft 1.2]]'', and was '''standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=map |content= {{XMLElement|map|Image Map}} }} {{defn|1= Specifies a client-side [[image map]].}} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=object |content= {{XMLElement|object|Object}} }} {{defn|1= Includes an object in the page of the type specified by the <code>type</code> attribute. This may be in any [[MIME]]-type the user agent understands, such as an embedded HTML page, a file to be handled by a plug-in such as [[Adobe Flash Player|Flash]], a [[Java (programming language)|Java]] [[applet]], a sound file, etc.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=param |content= {{XMLElement|param|Object Parameter|end=no}} }} {{defn|1= Originally introduced with {{tag|applet|o}}, this element is now used with {{tag|object|o}}, and should only occur as a child of {{tag|object|o}}. It uses [[HTML attributes]] to set a parameter for the object, e.g. width, height, font, background color, etc., depending on the type of object. An object can have multiple {{tag|param|s}} elements.}} {{defn|'''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=source |content= {{XMLElement|source|Source}} }} {{defn|1= Specifies different sources for audio or video. Makes use of the <code>src</code> attribute in a way similar to the {{tag|video|o}} and {{tag|audio|o}} elements.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=track |content= {{XMLElement|track|Track}} }} {{defn|1= Provides text tracks, like subtitles and captions, for audio and video.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=video |content= {{XMLElement|video|Video}} }} {{defn|1= Adds a playable [[HTML video]] to the page. The video URL is determined using the <code>src</code> attribute. Supported video formats vary from browser to browser.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{glossary end}} ===Forms=== {{Main|Form (HTML)}} These elements can be combined into a form or in some instances used separately as user-interface controls; in the document, they can be simple HTML or used in conjunction with Scripts. HTML markup specifies the elements that make up a form, and the method by which it will be submitted. However, some form of scripts ([[server-side script|server-side]], client-side, or both) must be used to process the user's input once it is submitted. (These elements are either block or inline elements, but are collected here as their use is more restricted than other inline or block elements.) {{glossary}} {{term|term=form |content= {{XMLElement|form|Form|atr={{XMLAttribute|action|Action|url|type=URL|need=required}}}} }} {{defn|1= Creates a [[form (web)|form]]. The {{tag|form|o}} element specifies and operates the overall action of a form area, using the required <code>action</code> attribute.}} {{defn|'''Standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=button |content= {{XMLElement|button|Button}} }} {{defn|1= A generic form button which can contain a range of other elements to create complex buttons.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=datalist |content= {{XMLElement|datalist|Data List}} }} {{defn|1= A list of <code>option</code>s for use in form elements.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=fieldset |content= {{XMLElement|fieldset|Fieldset}} }} {{defn|1= A container for adding structure to forms. For example, a series of related controls can be grouped within a {{tag|fieldset|o}}, which can then have a {{tag|legend|o}} added in order to identify their function.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=input |content= {{XMLElement|input|Input|end=no}} }} {{defn|1= {{tag|input|o}} elements allow a variety of standard form controls to be implemented.}} {{defn|'''Standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{defn|1='''Input Types:''' {{glossary}} {{term|term=checkbox |content= {{XMLAttribute|type|Field Type|checkbox|type=ENUM|need=implied}} }} {{defn|A '''[[checkbox]]'''. Can be checked or unchecked.}} {{term|term=radio |content= {{XMLAttribute|type|Field Type|radio|type=ENUM|need=implied}} }} {{defn|A '''[[radio button]]'''. If multiple radio buttons are given the same name, the user will only be able to select one of them from this group.}} {{term|term=button |content= {{XMLAttribute|type|Field Type|button|type=ENUM|need=implied}} }} {{defn|A general-purpose button. The element {{tag|button|o}} is preferred if possible (i.e., if the client supports it) as it provides richer possibilities.}} {{term|term=submit |content= {{XMLAttribute|type|Field Type|submit|type=ENUM|need=implied}} }} {{defn|A '''submit''' button.}} {{term|term=image |content= {{XMLAttribute|type|Field Type|image|type=ENUM|need=implied}} }} {{defn|An '''image button'''. The image URL may be specified with the <code>src</code> attribute.}} {{term|term=reset |content= {{XMLAttribute|type|Field Type|reset|type=ENUM|need=implied}} }} {{defn|A '''reset button''' for resetting the form to default values.}} {{term|term=text |content= {{XMLAttribute|type|Field Type|text|type=ENUM|need=optional}} }} {{defn|A '''one-line text input field'''. The <code>size</code> attribute specifies the default width of the input in character-widths. <code>max-length</code> sets the maximum number of characters the user can enter (which may be greater than size).}} {{term|term=search |content= {{XMLAttribute|type|Field Type|search|type=ENUM|need=implied}} }} {{defn|A variation of <code>text</code> which produces a search bar.}} {{term|term=password |content= {{XMLAttribute|type|Field Type|password|type=ENUM|need=implied}} }} {{defn|A variation of <code>text</code>. The difference is that text typed in this field is {{em|masked}} β characters are displayed as an asterisk, a dot, or another replacement. The password is still submitted to the server as [[plaintext]], so an underlying secure [[communication protocol]] like [[HTTPS]] is needed if confidentiality is a concern.}} {{term|term=file |content= {{XMLAttribute|type|Field Type|file|type=ENUM|need=implied}} }} {{defn|A [[file select]] field (for uploading files to a server).}} {{term|term=tel |content= {{XMLAttribute|type|Field Type|tel|type=ENUM|need=implied}} }} {{defn|A variation of <code>text</code> for [[telephone numbers]].}} {{term|term=email |content= {{XMLAttribute|type|Field Type|email|type=ENUM|need=implied}} }} {{defn|A variation of <code>text</code> for [[email addresses]].}} {{term|term=url |content= {{XMLAttribute|type|Field Type|url|type=ENUM|need=implied}} }} {{defn|A variation of <code>text</code> for [[URLs]].}} {{term|term=date |content= {{XMLAttribute|type|Field Type|date|type=ENUM|need=implied}} }} {{defn|A date selector.}} {{term|term=time |content= {{XMLAttribute|type|Field Type|time|type=ENUM|need=implied}} }} {{defn|A time selector.}} {{term|term=number |content= {{XMLAttribute|type|Field Type|number|type=ENUM|need=implied}} }} {{defn|A variation of <code>text</code> for numbers.}} {{term|term=range |content= {{XMLAttribute|type|Field Type|range|type=ENUM|need=implied}} }} {{defn|Produces a slider for that returns a number, but the number is not visible to the user.}} {{term|term=color |content= {{XMLAttribute|type|Field Type|color|type=ENUM|need=implied}} }} {{defn|A color picker.}} {{term|term=hidden |content= {{XMLAttribute|type|Field Type|hidden|type=ENUM|need=implied}} }} {{defn|<code>hidden</code> inputs are not visible in the rendered page, but allow a designer to maintain a copy of data that needs to be submitted to the server as part of the form. This may, for example, be data that this web user entered or selected on a previous form that needs to be processed in conjunction with the current form. Not displayed to the user but data can still be altered client-side by editing the HTML source.}} {{glossary end}} }} {{term|term=isindex |content= {{XMLElement|isindex|Index|end=no|deprecated=1}} }} {{defn|1= {{tag|isindex|s}} could either appear in the document head or in the body, but only once in a document. {{tag|isindex|s}} operated as a primitive HTML search form; but was {{lang|la|[[de facto]]}} obsoleted by more advanced HTML forms introduced in the early to mid-1990s. Represents a set of hyperlinks composed of a base URI, an [[ampersand]] and [[Percent-encoding|percent-encoded]] keywords separated by [[plus sign]]s.}} {{defn|<code>ISINDEX</code> existed in ''[[#HTMLTAGS|HTML Tags]]''; '''standardized''' in [[#HTML20|HTML 2.0]]; '''deprecated''' in [[#HTML401|HTML 4.0 Transitional]]; '''invalid''' in [[#HTML401|HTML 4.0 Strict]].}} {{term|term=keygen |content= {{XMLElement|keygen|Key pair generator|deprecated=1}} }} {{defn|1= A key pair generator.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]], but removed in HTML 5.2.}} {{term|term=label |content= {{XMLElement|label|Label|atr={{XMLAttribute|for|For|id|type=ENUM|need=implied}}}} }} {{defn|1= Creates a label for a form input, such as <code>radio</code>. Clicking on the label fires a click on the matching input.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=legend |content= {{XMLElement|legend|Legend}} }} {{defn|1= A legend (caption) for a {{tag|fieldset|o}}.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=meter |content= {{XMLElement|meter|Meter}} }} {{defn|1= A meter which needs a <code>value</code> attribute. Can also have: <code>min</code>, <code>low</code>, <code>high</code>, and <code>max</code>.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=option |content= {{XMLElement|option|Select List Option|atr={{XMLAttribute|value|Value|x|type=ANY|need=required}}}} }} {{defn|1= Creates an item in a {{tag|select|o}} list.}} {{defn|'''Standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=optgroup |content= {{XMLElement|optgroup|Options Group}} }} {{defn|1= Identifies a group of {{tag|option|o}} elements in a {{tag|select|o}} list.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=output |content= {{XMLElement|output|Output}} }} {{defn|1= The value of a form element.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=progress |content= {{XMLElement|progress|Progress Bar}} }} {{defn|1= A bar for showing the progress of an action.}} {{defn|'''Standardized''' in [[#HTML5|HTML5]].}} {{term|term=select |content= {{XMLElement|select|Selection List|atr={{XMLAttribute|name|Name|xyz|type=NMTOKEN|need=implied}}}} }} {{defn|1= Creates a selection list, from which the user can select a single option. May be rendered as a dropdown list.}} {{defn|'''Standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{term|term=textarea |content= {{XMLElement|textarea|Multiline Textarea|atr={{XMLAttribute|rows|Rows|8|type=INT}}}} }} {{defn|1= A multiple-line text area, the size of which is specified by <code>cols</code> (where a column is a one-character width of text) and <code>rows</code> [[HTML attributes]]. The content of this element is restricted to plain text, which appears in the text area as default text when the page is loaded.}} {{defn|'''Standardized''' in [[#HTML20|HTML 2.0]]; still current.}} {{glossary end}} ===Tables=== The format of HTML Tables was proposed in the [[#HTML30|HTML 3.0 Drafts]] and the later RFC 1942 ''[[#HTMLTABLES|HTML Tables]]''. They were inspired by the [[CALS Table Model]]. Some elements in these proposals were included in HTML 3.2; the present form of HTML Tables was standardized in HTML 4. (Many of the elements used within tables are neither ''block'' nor ''inline'' elements.) {{glossary}} {{term|term=table |content= {{XMLElement|table|Table}} }} {{defn|1= Identifies a table. Several [[HTML attributes]] are possible in HTML Transitional, but most of these are invalid in HTML Strict and can be replaced with style sheets. The <code>summary</code> attribute is informally required for accessibility purposes, though its usage is not simple.}} {{defn|Proposed in the [[#HTML30|HTML 3.0 Drafts]]; '''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=tr |content= {{XMLElement|tr|Table Row}} }} {{defn|1= Contains a row of cells in a {{tag|table|o}}.}} {{defn|Proposed in the [[#HTML30|HTML 3.0 Drafts]]; '''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=th |content= {{XMLElement|th|Table Header Cell}} }} {{defn|1= A {{tag|table|o}} header cell; contents are conventionally displayed bold and centered. An [[aural]] user agent may use a louder voice for these items.}} {{defn|Proposed in the [[#HTML30|HTML 3.0 Drafts]]; '''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=td |content= {{XMLElement|td|Table Data Cell}} }} {{defn|1= A {{tag|table|o}} data cell.}} {{defn|Proposed in the [[#HTML30|HTML 3.0 Drafts]]; '''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=colgroup |content= {{XMLElement|colgroup|Column Group}} }} {{defn|1= Specifies a [[column group]] in a {{tag|table|o}}.}} {{defn|Proposed in [[#HTMLTABLES|HTML Tables]]; '''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=col |content= {{XMLElement|col|Table Column}} }} {{defn|1= Specifies a column in a {{tag|table|o}}.}} {{defn|Proposed in [[#HTMLTABLES|HTML Tables]]; '''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=caption |content= {{XMLElement|caption|Table Caption}} }} {{defn|1= Specifies a caption for a {{tag|table|o}}.}} {{defn|Proposed in the [[#HTML30|HTML 3.0 Drafts]]; '''Standardized''' in [[#HTML32|HTML 3.2]]; still current.}} {{term|term=thead |content= {{XMLElement|thead|Table Header}} }} {{defn|1= Specifies the header part of a {{tag|table|o}}. This section may be repeated by the user agent if the table is split across pages (in printing or other paged media).}} {{defn|Proposed in [[#HTMLTABLES|HTML Tables]]; '''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=tbody |content= {{XMLElement|tbody|Table Body}} }} {{defn|1= Specifies a body of data for a {{tag|table|o}}.}} {{defn|Proposed in [[#HTMLTABLES|HTML Tables]]; '''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{term|term=tfoot |content= {{XMLElement|tfoot|Table Footer}} }} {{defn|1= Specifies the footer part of a {{tag|table|o}}. Like {{tag|thead|o}}, this section may be repeated by the user agent if the table is split across pages (in printing or other paged media).}} {{defn|Proposed in [[#HTMLTABLES|HTML Tables]]; '''Standardized''' in [[#HTML401|HTML 4.0]]; still current.}} {{glossary end}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)