CSS

Articles focused on CSS (Cascading Style Sheets) used in Web Design.

  1. Yes, we can use UTF-8 characters as class and ID names, but it will also increase CSS file sizes.
  2. List of CSS selectors used to style HTML elements.
  3. How to add hover effects on links using CSS pseudo classes.
  4. In HTML5 and Living Standard, CSS placed in the body is now valid.
  5. Here you can learn how to change the background of every second HTML element in a parent with CSS.
  6. The CSS !important rule allows users to overwrite author declarations. It is therefor best to avoid using it in StyleSheets.

About CSS

CSS (Cascading Style Sheets) are used to control the visual/presentational aspect of web pages, including things such as colors, fonts, margin, padding, and position.

When using CSS to design web pages, it is usually best to have the CSS in separate .css files, since these can be cached by the browser. Files that are cached only needs to be downloaded once, on subsequent requests the file will be loaded from the browser cache rather than downloading it again.

CSS files is usually loaded in the head part of HTML pages, but it is also possible to load them from the body.

When defining font sizes, it is recommended to use relative units such as em and rem.

For element-widths, use a combination of percentages and pixels with the min/max-width CSS properties, and media queries.