In the last post, I introduced selectors. I threw out a lot of information, and today I want to cover the issues in more details.
Looking at the modified web page code sheet, at the top, the @import url is the code for importing an external style sheet. The style sheet is in directory css, the file name is external_css, and the extension is css. Another form for connecting an external file sheet is:
<link rel=”stylesheet” type=”text/css” href=”css/external_css.css” />
This is called linking whereas the other is called importing. They both do the same thing. The order of precedence between the two is the linked sheet takes precedence over the imported sheet, if they are used in the same web page. Normally though you only have one or the other.
Further down the page there are two script statements, as shown below. These are external linked jQuery programming language files. We will discuss jQuery more in future posts.
<script type=”text/javascript” src=”js/jquery-1.5.1.min.js”></script>
<script type=”text/javascript” src=”js/jquery-ui-1.8.11.custom.min.js”></script>
Following these statements is an external javascript statement that links to an external javascript/jQuery page that has specific coding that works with the jQuery programming language sheet to control the behavior of the van.
<script type=”text/javascript” src=”js/external_js.js”></script>
In the style section further down the page there are 3 selectors: #header_change, #paragraph_change, and .list_change.
The #header_change selector is applied to the second header, Major Decision and increased the font size, changed the color and the font style. The color used the short hand notation #OFO. The full notation is #OOFFOO.
The #paragraph_change selector is applied to the last paragraph that starts with “Finally the —-.” and it increased the font size, color and style. The color used the short hand notation #96O. The full notation is #9966OO.
The .list_change selector is applied to the first item of each state in the lists, and changed the font size, font weight, and color. The color used the short hand notation #OOO. The full notation is #OOOOOO.
What people are saying