Professional Documents
Culture Documents
Attribute HTML
Attribute HTML
Attribute HTML
NIM : 001202100131
Notes :
1. W3Schools recommend always quote every attribute, and if your attribute need a
quote in it, you can use a single quote instead of double quote, and vice versa.
Example:
<p title=’Christian”matthew”wiwaha’>this is a paragraph</p> or
<p title=”Christian’matthew’wiwaha”>this is paragraph</p>
2. There are 2 types of URL link of src attribute :
a) Absolute URL : this type of URL is used when you’re using image on another
website, in addition, your picture will be deleted if the website hosts delete the
image on their website.
b) Relative URL : this type of URL is used when you already downloaded the
image in your computer (beware of copyrights).
3. On title attribute, the title will be displayed if your mouse is on the element where you
put the title attribute.
4. On id attribute, id must be unique (different with other), this attribute usually used to
point element for style in CSS or JS.
5. On class attribute, this attribute is also usually used to point element for style in CSS
or JS, but the different between id is the same class can be put in one or more
elements, but the id attribute is only can be put in one element.
6. On some attributes above, the onended, onerror, onemptied attribute needs a Java
Script to use it.
7. On readonly attribute, it is used to make the text from text area can’t be edited, but the
user still can copy the text from the textarea.