Vous êtes sur la page 1sur 2

8/2/13 HTML Attributes

Search w3schools.com:
Select Language ​

HOME HTML C SS JAVASC RIPT JQUERY XML ASP.NET PHP SQL MORE... R EFER ENC ES | EXAMPLES | FO R UM | ABO UT

SHARE THIS PAGE


Get Certified
Study Web Technologies
and get a diploma
at w3schools.com Like 76k

HTML Basic
HTML Attributes WEB HOSTING
HTML HOME
Best Web Hosting
HTML Introduction « Previous Next Chapter »
eUK Web Hosting
HTML Editors
HTML Basic Attributes provide additional information about HTML elements. UK Reseller Hosting

HTML Elements Domain, Hosting & Email

HTML Attributes
HTML Attributes
HTML Headings WEB BUILDING
HTML elements can have attributes
HTML Paragraphs
Attributes provide additional information about an element Download XML Editor
HTML Formatting Attributes are always specified in the start tag
FREE Website BUILDER
HTML Links Attributes come in name/value pairs like: name="value"
FREE Website C reator
HTML Head

Attribute Example
Best Website Templates
HTML CSS
HTML Images
HTML links are defined with the <a> tag. The link address is specified in the href attribute:
HTML Tables STATISTICS
HTML Lists
Example Browser Statistics
HTML Blocks
OS Statistics
HTML Layout <a href="http://www.w3schools.com">This is a link</a>
Display Statistics
HTML Forms
Try it yourself »
HTML Iframes
HTML Colors
HTML Colornames
HTML Colorvalues Always Quote Attribute Values
HTML JavaScript
Attribute values should always be enclosed in quotes.
HTML Entities
HTML URL Encode Double style quotes are the most common, but single style quotes are also allowed.

HTML Quick List Tip: In some rare situations, when the attribute value itself contains quotes, it is necessary to use single
HTML Summary quotes: name='John "ShotGun" Nelson'
HTML XHTML

HTML5 News
HTML Tip: Use Lowercase Attributes
HTML5 Intro Attribute names and attribute values are case-insensitive.
HTML5 New Elements
However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in their HTML
HTML5 Canvas 4 recommendation.
HTML5 SVG
Newer versions of (X)HTML will demand lowercase attributes.
HTML5 Drag/Drop
HTML5 Geolocation
HTML5 Video
HTML Attributes Reference
HTML5 Audio A complete list of legal attributes for each HTML element is listed in our: HTML Tag Reference.
HTML5 Input Types
Below is a list of some attributes that can be used on any HTML element:
HTML5 Form Elements
HTML5 Form Attributes Attribute Description

HTML5 Semantic class Specifies one or more classnames for an element (refers to a class in a style sheet)
HTML5 Web Storage
id Specifies a unique id for an element
HTML5 App Cache
HTML5 Web Workers style Specifies an inline CSS style for an element
HTML5 SSE
title Specifies extra information about an element (displayed as a tool tip)
HTML Media
For more information about global attributes: HTML Global Attributes Reference.
HTML Media
HTML Object
HTML Audio « Previous Next Chapter »
HTML Video
HTML YouTube

HTML Examples
HTML Examples
HTML Quiz
HTML5 Quiz
HTML Certificate
HTML5 Certificate

HTML References
HTML Tag List
HTML Attributes

w3schools.com/html/html_attributes.asp 1/2
8/2/13 HTML Attributes
HTML Events
HTML Canvas W3Schools' Online Certification
HTML Audio/Video The perfect solution for professionals who need to balance work, family,
HTML Doctypes and career building.
HTML Colornames
More than 10 000 certificates already issued!
HTML Colorpicker
HTML Colormixer Get Your Certificate »
HTML Character Sets
HTML ASCII The HTML Certificate documents your knowledge of HTML.

HTML ISO-8859-1 The HTML5 Certificate documents your knowledge of advanced HTML5.
HTML Symbols
The CSS Certificate documents your knowledge of advanced CSS.
HTML URL Encode
HTML Lang Codes The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
HTTP Messages The jQuery Certificate documents your knowledge of jQuery.
HTTP Methods
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
Keyboard Shortcuts
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.

The PHP Certificate documents your knowledge of PHP and SQL (MySQL).

Top 10 Tutorials Top 10 References Examples Quizzes Color Picker

» HTML Tutorial » HTML/HTML5 Reference » HTML Examples » HTML Quiz


» HTML5 Tutorial » C SS 1,2,3 Reference » C SS Examples » HTML5 Quiz
» C SS Tutorial » C SS 3 Browser Support » XML Examples » XHTML Quiz
» C SS3 Tutorial » JavaScript » JavaScript Examples » C SS Quiz
» JavaScript Tutorial » HTML DOM » HTML DOM Examples » JavaScript Quiz
» jQuery Tutorial » XML DOM » XML DOM Examples » jQuery Quiz
» SQL Tutorial » PHP Reference » AJAX Examples » XML Quiz Statistics
» PHP Tutorial » jQuery Reference » ASP.NET Examples » ASP Quiz
» ASP.NET Tutorial » ASP.NET Reference » Razor Examples » PHP Quiz » Browser Statistics
» XML Tutorial » HTML C olors » ASP Examples » SQL Quiz » Browser OS
» SVG Examples » Browser Display

RE P O RT E RRO R | HO ME | TO P | P RI N T | FO RU M | A BO U T | A D V E RT I SE WI T H U S

W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
C opyright 1999-2013 by Refsnes Data. All Rights Reserved.

w3schools.com/html/html_attributes.asp 2/2

Vous aimerez peut-être aussi