|
Tip #3 on Attributes |
It is necessary to use quotes on attribute values which contain spaces:
| HTML file: | Displayed by browser: |
|---|---|
|
<p title=About W3Schools>
When the cursor hovers over this paragraph, your browser will display the first word from an unquoted value or the entire quoted value from the TITLE attribute.</p> |
When the cursor hovers over this paragraph, your browser will display the first word from an unquoted value or the entire quoted value from the TITLE attribute. |
|
<p title="About W3Schools">
When the cursor hovers over this paragraph, your browser will display the first word from an unquoted value or the entire quoted value from the TITLE attribute.</p> |
When the cursor hovers over this paragraph, your browser will display the first word from an unquoted value or the entire quoted value from the TITLE attribute. |
|
Using quotes are most common. Omitting quotes can produce errors. A good habit is to always use quotes with attribute values. |