CSS - moderate: Block style

previous

We are now going to have a look at creating <style> blocks within the HTML code. Similar to Inline CSS, this technique will bulk out your HTML code, however it is much easier to read and make sense of than Inline CSS.

The biggest advantage to this technique is that you can add style to more than one element. Let's have a look at example piece of code:

<style> Style rules go here </style>

The above example is great for adding a style element to all elements, as it will turn all paragraphs blue. However what if you want to just apply style to one or two particular things?

next
  • but
  • but
  • but
  • but
  • but
  • but

close

submit