Lab#10 and 11

These two labs were the first labs in which it was required to include CSS( Cascading Style Sheet) in the code. CSS is used to decorate and design the webpage; the background color, font family, and other properties can be included in the code to style the webpages. HTML is the basic structure or foundation of a webpage and CSS is more like clothing of the webpage. With this in mind there is a different layout/rules when using CSS. Actually there are multiple ways of using CSS: internal, inline, and external. For lab 10 we used internal and for lab 11 we used external.

Lab 10 was overall just taking an html document and adding CSS to different tags using an internal method. To do so we had to add a <style> tag in the heading which is used to differentiate what is CSS from HTML. Within the style tag there must be a selector, in other words there you must select the tag which you want to edit by just putting the name without any brackets. Then there must be a curly bracket {} and next there must be a property stated, this could be font family or color. After the property there must be a colon which sets off the parameter or value in which the property is taking and to finish the action a semicolon has to be put. An example of internal CSS can be seen below.


Lab 11 is only different in that a separate file holds all the CSS information. This can be easily done by creating a new CSS file and linking it to the HTML file using the <link> tag. Since it is a CSS document there is no need for a <style> tag. The CSS for lab 10 and 11 are the same. An example of an external CSS file can be seen below.

 The purpose of these labs was to get a basic practice of implementing CSS into HTML files in multiple ways. These skills can be useful when wanted to design webpages in a much more complex and decorative way in order to not have a bland page with only black and white. I see myself using these skills in the future when designing other webpages including projects and other labs.



Comments

Popular posts from this blog

Lab4-Color Table

Lab16: My First JavaScript

MLH Local Hack Day 2017