1
XHTML - Lesson 4/5 on Mon Aug 23, 2010 2:35 pm
Unknown Data
Registered Member

XHTML - Lesson 4/5 Learn XHTML - Part 4 |
This is lesson 4 out of 5. Attributes in XHTML Like elements there are some specific rules to observe. We will take a look at four steps in this tutorial. Attributes should be written with small letters As with elements it's also important to write the attributes with small letters. Wrong: attribute written with big letters
Correct: attribute written with small letters
The value should always be written with quotes The value of a attribute should always be written with quotes. Notice that this also apply to numeric values. Wrong: the value is indicated without quotes
Correct: the value is indicated with quotes
Minimized attributes In HTML is it possible to use minimized attributes. But in XHTML these attributes should be transcribed to normal attributes. Wrong: minimized attribute
Correct: attributes indicated in full length
The attribute ID should be used to identification HTML 4 introduced the attribute "name" for elements like: <a>, <form>, <frame>, <img> and more. HTML 4 introduced also the attribute "id" - both of them to make a indication a element. In a XHTML document should "id" fx. be used to identification of bookmark. Like here. Wrong: write attribute name
Correct: write attribute id
Notice that the attribute name still can be used at form fields. Fx <input name="name" type="text"/> |
| Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators. |


Home

