Introduction to the Categories of CSS Usage As you may know already, attributes can be used to add functionality to an HTML tag. Not all attributes can be applied to all tags. In fact, each attribute is used for specific goals. This brings even more limitations to both the tags and their attributes. To expand on where HTML tags leave off, CSS adds styles to those tags. There are three different ways a style is applied to a tag. You can choose to use one technique, you can combine two techniques, or you can combine all three techniques. CSS is not difficult at all. Probably the biggest difficulty in using CSS is to decide how to use it. This is because it presents limitless options. CSS and HTML The Releases of CSS and Browsers Like every computer language, CSS is regularly updated and a new version can be released any time. At the time of this writing, the current release is designated CSS3. CSS is so huge that the whole language is not released at the same time, as done in other computer languages. Instead, sometimes a feature of CSS is changed while other parts of the language are kept intact. Like most computer applications, browsers are released regularly with new functionalities. Since browsers are developed by different companies or organizations, they don't have a policy of being released at the same type. Still, browsers try to keep up-to-date with new releases of HTML and CSS. Because editions of browsers are released at different times, it is not unusual that they interpret a style differently. In these lessons, all CSS codes were tested in Internet Explorer 11, Google Chrome version 46.0.2490.71 m in both Microsoft Windows and Linux, and Mozilla Firefox in both Microsoft Windows and Linux. The Document Type If you want webpage to follow the current standards of CSS, you should start its first line with: <!DOCTYPE html> Here is an example: <!DOCTYPE html> <html> <head> <title>Energy: Electricity</title> </head> <body> <h1>Electricity</h1> <h3>Introduction</h3> <p>Electricity is used to supply power to machines and devices. The resulting effects include public light, home heat, industrial storage, machine running, engine rolling, etc. The features of electricity can be found in the human body and in animals. The electricity is used in vehicles, in home appliances (refrigerators, vacuum cleaners, TV sets, etc), in air conditioning (home, vehicles, commercial buildings).</p> <h3>Production</h3> <p>Electricity production consists of using a certain source of power to produce electricity. Some sources of power are the wind, the steam, the gas, the heat, the sun, the tides (from oceans), the fossils, water (from rivers), or the generators. Electricity is captured or transformed from those sources and then transmitted to machines that directly or indirectly uses it.</p> <h3>Sources of Energy</h3> <p>The electricity is produced or generated from various sources, including:</p> <ul> <li>Wind Power</li> <li>Solar Energy</li> <li>Tidal Energy</li> <li>Fossil Fuel</li> <li>Hydroeletricity</li> <li>Generators</li> </ul> <h5>Copyright, © 2015</h5> </body> </html> This would produce:
|