Fonts and CSS

Fonts are a crucial element in creating an appealing website. In order to understand how to use fonts in CSS, we need to understand the different generic and font families.

Generic families group fonts by their appearance. CSS accepts the existence of 3 families, two of which are serif and sans-serif.  Fonts that belong to the serif familiy willIn order to understand the difference between the two, keep in mind that “sans” essentially means “without”. Here’s a simple guide to show the difference between the two. Continue reading “Fonts and CSS”

CSS Color Basics

Colors can really help bring your website together, so a color scheme is super important. Sure, you could choose and pick your own, but you could also use a color scheme designer.

After experimenting with the different color schemes you can create, just hover over any of the colors to find the HEX value.  For the website above, you’ll find the hex code simply by hovering over the colors. If you wanted to make your background color black (which has a HEX value of #000000), you would put it into your style tag like this:

<style>
     body {
          background-color:#000000;
     }

Alternatively, if you want to use the RGB values for black in your code instead, you’ll have to put in the values like this:

<style>
     body {
          background-color:rgb(0,0,0);
     }

However, for simple colors like black and white (for the full list, go here), simply putting the color name into your code will do. Thankfully, black is on there, and you would put it in like this:

<style>
     body {
          background-color:black;
     }

Happy coding!