Lab#12- Diving Further into CSS

Lab 12 was a continuation of the previous two labs just going one step further. This lab required that we include classes and IDs to the CSS format in order to make it more organized and coherent. Adding either a class of ID makes it so a CSS attribute can be made on the tags which have the same class or ID; therefore, you don't have to repeat the same attribute/property multiple times to encompass more than one tag. To add a class or ID all that is needed is to add it into any tag that is desired. An example of this could be <body class="text">. Now to add a class or ID to the CSS document instead of just putting the name of the tag you would put the class or id name. However, for id there must be a # before the id name and for class there must be a period. This mainly serves to differentiate the two. Another difference is that an id can only be used for one tag while a class can be used for multiple tags.
Since the class and id names have to be exactly the same everywhere for it to work it was a little tricky at first, but after becoming accustomed to the process it became simple to use effectively. This lab taught me how to use class and id to not waste my time repeating the same property for different tags. I will for sure use these skills in the future in order to save time and make my CSS files much more organized.

web page with CSS

Comments

Popular posts from this blog

Lab4-Color Table

Lab16: My First JavaScript

MLH Local Hack Day 2017