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!
==Frames== {{Main|Frame (World Wide Web)}} Frames allow a visual HTML browser window to be split into segments, each of which can show a different document. This can lower bandwidth use, as repeating parts of a layout can be used in one frame, while variable content is displayed in another. This may come at a certain usability cost, especially in non-visual user agents,<ref>{{cite web|url=http://www.washington.edu/doit/are-frames-accessible|title=Are frames accessible?|quote=...frames do present additional usability challenges that are unique to users with disabilities, particularly those who use screen readers.}}</ref> due to separate and independent documents (or websites) being displayed adjacent to each other and being allowed to interact with the same parent window. Because of this cost, frames (excluding the {{tag|iframe|o}} element) are only allowed in HTML 4.01 Frame-set. Iframes can also hold documents on different servers. In this case the interaction between windows is blocked by the browser. Sites like [[Facebook]] and [[Twitter]] use iframes to display content ([[Plug-in (computing)|plugins]]) on third party websites. Google [[AdSense]] uses iframes to display banners on third party websites. In HTML 4.01, a document may contain a {{tag|head|o}} and a {{tag|body|o}} {{em|or}} a {{tag|head|o}} and a {{tag|frameset|o}}, but not both a {{tag|body|o}} and a {{tag|frameset|o}}. However, {{tag|iframe|o}} can be used in a normal document body. {{glossary}} {{term|term=frameset |content= {{XMLElement|frameset|Frameset|deprecated=1}} }} {{defn|1= Contains the set of {{tag|frame|s}} elements for a document. The layout of frames is given by comma separated lists in the <code>rows</code> and <code>cols</code> [[HTML attributes]].}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]] Frameset, '''obsolete''' in HTML5.}} {{term|term=frame |content= {{XMLElement|frame|Frame|end=no|deprecated=1}} }} {{defn|1= Defines a single frame, or region, within the {{tag|frameset|o}}. A separate document is linked to a frame using the <code>src</code> attribute inside the {{tag|frame|s}} element.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]] Frameset, '''obsolete''' in HTML5.}} {{term|term=noframes |content= {{XMLElement|noframes|Frame Support Fallback|deprecated=1}} }} {{defn|1= Contains normal HTML content for user agents that do not support {{tag|frame|s}} elements.}} {{defn|'''Standardized''' in [[#HTML401|HTML 4.0]] Transitional, '''obsolete''' in HTML5.}} {{term|term=iframe |content= {{XMLElement|iframe|Inline Frame}} }} {{defn|1= An inline frame places another HTML document in a frame. Unlike an {{tag|object|s}} element, an {{tag|iframe|o}} can be the "target" frame for links defined by other elements, and it can be selected by the user agent as the focus for printing, viewing its source, and so on. The content of the element is used as alternative text to be displayed if the browser does not support inline frames. A separate document is linked to a frame using the <code>src</code> attribute inside the {{tag|iframe|s}}, an inline HTML code is embedded to a frame using the <code>srcdoc</code> attribute inside the {{tag|iframe|s}} element.}} {{defn|First introduced by Microsoft Internet Explorer in 1997, '''standardized''' in [[#HTML401|HTML 4.0]] Transitional, '''allowed''' in HTML5.}} {{glossary end}} ===<code>longdesc</code> attribute=== In [[HTML]], '''<code>longdesc</code>''' is an attribute used within the {{tag|img|s}}, {{tag|frame|s}}, or {{tag|iframe|o}} elements. It is supposed to be a [[URL]]{{refn|group=note|Strictly an [[Internationalized resource identifier|IRI]], not a URL; although URLs are a subset of IRIs.}} to a document that provides a '''long description''' for the image, frame, or iframe in question.<ref>{{cite web|url=http://www.w3.org/TR/REC-html40/struct/objects.html|title=Objects, Images, and Applets|publisher=W3C|access-date=2008-12-20}}</ref> This attribute should contain a URL, {{em|not}} β as is commonly mistaken β the text of the description itself. <code>longdesc</code> was designed to be used by [[screen reader]]s to display image information for computer users with [[accessibility]] issues, such as the blind or [[Visual_impairment |visually impaired]], and is widely implemented by both web browsers and screen readers.<ref>{{cite web|url=http://www.w3.org/html/wg/wiki/ChangeProposals/InstateLongdesc/Implementation|title=InState Longdesc|access-date=2011-09-05}}</ref> Some developers object that<ref>{{cite web|url=http://www.webaim.org/techniques/images/longdesc.php#longdesc|title=Creating Accessible Images|publisher=WebAim|access-date=2008-12-20}}</ref> it is actually seldom used for this purpose because there are relatively few authors who use the attribute and most of those authors use it incorrectly; thus, they recommend deprecating <code>longdesc</code>.<ref>{{citation|url=http://wiki.whatwg.org/wiki/Longdesc_usage |title=Longdesc usage - WHATWG Wiki |publisher=Wiki.whatwg.org |access-date=2012-03-26}}</ref> The publishing industry has responded, advocating the retention of <code>longdesc</code>.<ref>{{cite web|url=http://www.w3.org/Bugs/Public/show_bug.cgi?id=13461|title=Bug 13461 - Commentary on Issue #30 (longdesc) from the Association of American Publishers |access-date=2011-09-05}}</ref> ====Example==== <syntaxhighlight lang="html"> <img src="Hello.jpg" longdesc="description.html"> </syntaxhighlight> <br />Content of <code>description.html</code>: <syntaxhighlight lang="html"> <br /> <p>This is an image of a two-layered birthday cake.</p> ... </syntaxhighlight> ====Linking to the long description in the text==== Since very few graphical browsers support making the link available natively (Opera and iCab being the exceptions), it is useful to include a link to the description page near the {{tag|img|s}} element whenever possible, as this can also aid sighted users. =====Example===== <syntaxhighlight lang="html"> <img src="Hello.jpg" longdesc="description.html" /> [<a href= "description.html" title="long description of the image">D</a>] </syntaxhighlight>
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)