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!
====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.}}
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)