How HTML Works - Attributes and Values; Text; Comments
Tags:
Attributes and Values
Attributes are used to change the effect of many of the tags used in
HTML. They are placed in the opening tag before the '>' character and
separated from the tag name and each other with space characters.
In order to get the desired effect from the attribute, you must set its
value. Not all attributes require values, however. To specify the
value, a equals ('=') character is placed immediately after the attribute name
and enclosed in quote characters ('"'). E.g.:
<font face="Times New Roman" color="yellow">This text
will be in the font 'Times New Roman' and coloured yellow</font>
Which generates:
This text will be in the font
'Times New Roman' and coloured yellow
Not all attributes have to be set for a tag - the FONT
tag also has the SIZE attribute. If attributes are omitted, the default
values will be used instead. As stated above, not all attributes have
values e.g.:
<button disabled>A disabled button</button>
Which generates:
Have a look a few of the tags from the dropdown list above to see what
attributes they use, as well as the examples.
When writing HTML manually, it is useful to comment your code as you would
when using a programming language. To add a comment into your code, it
must be entered after "<!--" and before "-->" e.g.: