HTML Selector - Redefining a Tag
The HTML Selector type of cascading style sheet adds
new values to a tag while usually maintaining the
original tag's meaning. For example, you can redefine
the italics tag to be bold and 42 points and it will
still also apply the italics format to the text.
Here is an example of
how to make the bold tag do more.
Your assignment:
- Open up the source code for this file in Notepad
or your favorite ASCII text editor.
- Redefine the italics tag ( i ) to be:
- 60 points
- Using the font: courier
- Follow the example in the code in the <style> tag
in the head of this document for the syntax needed. You will
see some comments above it in the code as well that might help you.
- What you will need to do the following, which is very similar to
what is within the existing style tag for redefining the "b" tag:
- After the closing curly brace of the bold tag's redefinition, start a new row in the code and type
in an "i".
- Follow it by an opening "curly brace".
- Then use the following CSS properties along with the values
specified above (60 points, courier) but be sure to write the rule
using the correct syntax (colon, semi-colon, etc.). The same properties
were also used in the redefinition of the bold tag that is already there.
Follow that as an example of how to specify the following using the values
in step 2:
- Then put in a curly brace at the end
- Apply the italics tag to the following word right
here within the instructions: WORD.
- Once you save the file and then view it in your
browser you ought to see the difference. Save the file as:
CSS_Redefine_Tag_yourlastname.html
- Send it to me by email.
© 2008 Dan Hitchcock Vaughan and its licensors. All rights
reserved.