CSS - Introduction
query_builder | Christopher PisaniWhat is CSS ?
CSS stands for cascading style sheets. It is a language that goes in line with JavaScript and HTML, to better represent the documents in a more interactive way, in means of layout, colours, fonts and animations. With CSS we can have our page suitable for a large number of different screen dimensions, instead of shrinking the page to fit the screen. When configured properly, the elements will float and put in place, to best fit the dimension of the screen it is viewed on.
All of the HTML built-in attributes, which were used for appearance purposes, are now being handled by CSS.
CSS example:
<h1>This is a heading</h1>
<style>
h1 {
color: blue;
text-align: center;
background-color: yellow;
padding: 25px;
border: 1px solid lightgrey;
}
</style>
There is a lot more to CSS than you can imagine. You can have multiple fonts on one page, animations and interactions.
The CSS code can be placed in two ways. It can be used within the <style> element, which is put in the head or it can also be written on a separate file and saved as .css extension.
The file can be called from the head section, by the following method:
<link rel="stylesheet" type="text/css" href="myStyleSheet.css">