Print Design Templates Take a look at these creative Graphic Design templates for brochures, flyers, newsletters, stationery, postcards, ads, menus and posters for a variety of businesses.
Invoicing 4 Freelancers A complete, secure, online billing application that maintains hourly service billing, flat fee billing and recurring charges. Integration with Authorize.Net and other leading payment gateways provides hands-free recurring billing with a sophisticated CRM system.
Free Design Magazines Browse through our extensive list of free Graphic Design, Web Design, Business, Computer, and Computer Graphics magazines, white papers, downloads and podcasts to find the titles that best match your skills and interests; topics include management, marketing, operations, sales, and technology. Simply complete the application form and submit it. All are absolutely free to freelance professionals who qualify.
Suggested Links Photoshop Tutorials
Logo Designer's Logos
Web Design Tools List
Layouts & Templates Directory
Web Design & Graphic Design Blog
Photoshop, Flash, 3D Studio Max Tutorials
Web Designers & Developers
Crafts for Kids
Photoshop Tutorial Man
Tutorial Guide -- Free Webmaster Tutorials
Design Contests
How to Draw
Work From Home Job Search
OTHER SITES WE OWN
AllFreelance
Graphic Design Resources Directory
Graphics Tutorials Directory
Social Networking Articles
Design Sites Up
All Freelance Work & Portfolios
Graphic Design Community
Education & Learning Directory
![]() |
home > Web Design Tutorials > Programming Tutorials > XHTML Coding Tutorials > XHTML ATTRIBUTES TUTORIALS
Core Attributes
Core attributes are shared by most tags. The normally provide information about the tag or associate with code elsewhere in the document. The attributes are…
Attributes for Style and Presentation
Presentational attributes are attributes used for styling the content of an element. Most of them have been deprecated in favor of style sheets, but it still helps to know what they are. You never know when you'll have to convert some old code over, or prepare a document to work in older browsers that don't understand Cascading Style Sheets.
Rules for XHTML Attributes
All XHTML attribute names should be in lower case. All attribute-value pairs should be quoted. HTML supports certain attributes which…
Attributes
In this part of the XHTML tutorial, I will show you the changes to HTML attributes in XHTML. HTML attributes are the extra parts you can add onto tags (such as src in the img tag) to change the way in which they are shown. There are four changes to the way in which attributes are changed.
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
||
Attribute values must always be quoted
An element can optionally contain one or more attributes in its start tag. An attribute is a name-value pair separated by an equal sign (=). Attribute values must always be quoted.
XHTML Standard Attributes
XHTML tags can have attributes. The special attributes for each tag are listed under each tag description. The attributes listed here are the core and language attributes that are standard for all tags (with a few exceptions).
Attributes, Arguments and Anchors
In XHTML 1.0, all attributes must have arguments, and all arguments must be in double quotes. Even if the argument is simply a number or a percentage, you still need to place it between double quotes.
XHTML1.0 Element Attributes by DTD
A list of XHTML1.0 Element Attributes and related information…
align
Set the horizontal and vertical alignment of the div element relative to the current location...
class
Assigns a class name or names to the element. Classes are typically used with Cascading Style Sheets…
onmouseout
Onmouseout: An event handler that specifies an action to take when the reader moves the pointing device away from an element.
onmousemove
onmousemove: An event handler that specifies an action to take when the reader moves the pointing device while it is over an element.
dir
dir: Defines the directionality of text without a pre-defined direction (per-UNICODE).
onkeyup
onkeyup: An event handler that specifies an action to take when the reader releases a key over an element.
onkeypress
onkeypress: An event handler that specifies an action to take when the reader presses and releases a key over an element.
onmouseup
onmouseup: An event handler that specifies an action to take when the reader releases the pointing device above an element.
ondblclick
ondblclick: An event handler that specifies an action to take when the reader double-clicks on an element.
align
align: Indicates the alignment of the enclosed text within the current location
id
id: Formats the contents of the tag according to the style id. Note: IDs must be unique within a document.
onclick
onclick: An event handler that specifies an action to take when the reader clicks on an element.
onmouseover
onmouseover: An event handler that specifies an action to take when the reader moves the pointing device over an element.
title
title: Specifies a title about the element. Some browsers will display this information when the mouse pointer hovers over the element, others display the information in the right-click menu.
lang
lang: Defines the language of the linked document.
style
style: Formats the contents of the element according to the listed style.
onkeydown
onkeydown: An event handler that specifies an action to take when the reader presses down a key over an element.
cite for blockquote and q
cite for blockquote and q: URI for the source document or message. This attribute provides information about the source of the quotation.
cite for del and ins
cite for del and ins: A URI detailing why the document was changed.
frameborder
frameborder: Width of the border around a frame.
onload
onload: The onload event occurs when the user agent finishes loading a window or all frames within a frameset.
onunload
onunload: The onload event occurs when the user agent removes a document from a window or frame.
bordercolor
bordercolor: Color of the border around a frame or frameset.
rows
rows: Determines the number and size of the rows in the frameset. define the size in percentages, pixels, or use an asterix (*) to use the current available space.
scrolling
scrolling: Defines the state of the scrollbar on the frame. There are three options: on - scrollbars appear, off - scrollbars never appear, and auto (the default) - scrollbars appear as they are needed.
cols
cols: The visible width of a textarea element in average character widths.
framespacing
framespacing: Width of the space around a frameset.
name
name: Assigns the control name for a form.
src
src: Defines URI or location of the element being requested, be it an image, a script, or another Web page.
ismap
ismap: Use a server-side image map.
onblur
onblur: Action when the element loses the focus.
onselect
onselect: Action when some text is selected.
maxlength
maxlength: Defines the maximum number of characters valid for a text field.
value
id: Sets the value of the radio button, checkbox, or dropdown menu option.
onfocus
onfocus: Action when the element gains the focus.
type
type: Defines the position in the tab order for the element. Used to make pages more accessible.
size
id: Sets the size of each input type.
onchange
onchange: Action when the element changes.
tabindex
tabindex: Defines the position in the tab order for the element. Used to make pages more accessible.
disabled
id: Sets the form control to be disabled for use within the form.
accept
accept: A list of MIME types used with file upload in forms.
accept-charset
accept-charset: A list of the character sets supported by the form.
accesskey
accesskey: A single character keystroke that will bring focus to the element.
abbr
abbr: Abbreviation for the header cell of a table.
action
action: Defines the server-side form handler.
Attribute Collections
Many of the abstract modules in this section define the required attributes for elements. The table below defines some collections of attributes that are referenced throughout the modules. These expressions should in no way be considered normative or mandatory. They are an editorial convenience for this document. When used in the remainder of this section, it is the expansion of the term that is normative, not the term itself.
accesskey
The accesskey attribute allows you to designate a character on the keyboard that when pressed, along with the alt or meta key, will bring focus to an HTML element. By focus, we mean that the cursor will go to that element (for example, a link or an input box in a form).
class
The class attribute is used to assign the name of a style sheet class to a tag.
dir
The dir attribute is used to declare the direction that the text should run, either left to right (default) or right to left.
id
The id attribute is used to assign a identifier value to a tag. Each id must be unique within the document and each element can only have one id.
lang
The lang attribute is used to define the base language to be used for displaying text and characters on a Web site. This allows an internationalization of HTML for a very large number of languages.
style
The style attribute is used to assign style sheet properties to the specific element containing the attribute.
tabindex
The tabindex attribute specifies an integer that defines the rank in the tabbing order for the specified element when you use the keyboard to navigate (tab through) a page.
title
The title attribute is used to assign a name to a tag. This name can be any string of characters or words. Further, you can use the HTML character entities in the name. For example, you could use #10; which will cause a line break (just like the br tag) in the name.
RECENT ARTICLES from Graphic Design BloG
Business Cards: Ideas and Inspiration, Part II
Today we continue looking at business cards that stand out, and here’s hoping you get some inspiration and ideas! After all, you only get one first impression, so your business card should be something that showcases the best of your design abilities. On Wednesday we looked at the use of interesting shapes, 3D business cards, [...]
![]() |
![]() |
|
![]() |
![]() |
|
Making the Move from Freelance Work to Full-Time Employment
If you are like me, after graduating from a graphic design school, your goal was to make it as a freelance web designer. The lure of flexible hours, working from home and the freedom to manage your own time was too much to resist. At some point, I decided it may be ?easier? to work [...]
Tips for Asking for a Raise
At some point in our careers, there is a time when we open our paychecks and breathe a sigh of disappointment. After years of studying at a graphic design school and countless hours spent devoted to learning from colleagues and researching new design techniques, the numbers on our pay stub just don?t seem to measure [...]
Stock vs. Original Digital Photography
A picture is worth a thousand words. Graphic design schools teach us that photos on web sites have the potential to capture our attention, motivate us to read more or even propel us to navigate to another web site entirely. They inflict emotion and can establish a connection between site visitors and the goods or [...]
3 Tips to Manage Content Updates
While walking through the pharmacy I passed the aisle filled with red heart-shaped boxes filled with chocolates and remembered Valentine?s Day is quickly approaching. Even though I was surrounded by so many representations of love, it reminded me of one thing that I actually despise ? web content updates! Graphic design schools teach many, many [...]
Should You Drop the Drop-Down Menus?
I was recently on a home improvement web site searching for ideas for renovating my bathroom. After a few minutes on the site I realized that I was not going to find what I was looking for ? it certainly could have been there, but I just could not find it. Menu after menu had me [...]
Sharpen Your Skills and Gain an Edge at 2011 Web Design Conferences
Graphic design schools prepare us well for our immediate future, but it takes effort to stay on top of the ever-changing field of web design. Following are a few of the upcoming conferences and trade shows meant to help you stay a step ahead of the competition.
Interaction Eleven In its fourth year, Interaction Eleven is [...]
All Web Design Resources is a Directory & Blog Full of Tools for Web Site Designers
All Web Design Resources Portal is a Web Site Design education directory with resources & articles for Graphic Designers, Web Developers, & Web Designers including a Web Design forum, blog, graphics software tips, web development resources, web programming tools, web design jobs, advice for new web designers about web design schools and education as
well as tips for freelance web design business owners, and much more.