Thursday, 3 November 2016

CSS Basic

In this post I will cover the basics of CSS. As I said in my earlier posts, CSS is used to style your webpage. It gives your webpage a 'prettier' and 'nicer' feel.
To begin, you can create a separate style sheet, or you can just place your CSS inside your HTML within <style> tags. I will be using the <style> tags for my example.
Within these <style> tags, you will simply state which elements you would like to style. After this, you will code what style rules you want to change. These style rules will be held within curly brackets {}. Your first declaration, will be to state what you would like to edit (property), followed by the value. See my example below.



In CSS, there is sometimes different ways to declare values, take 'color' for instance. There is three ways to declare a value for color:

            • color: red; - This is declaring it by name
            • color: rgb(255,0,0); - This is declaring it by the formula red, blue and green
            • color: #FF0000 - This is declaring it by Hex. Value
All of the above values will give you the color 'red'.

 It is also possible to obtain double barrel property tags, for example, some of these include:
            • background-image
            • background-repeat
            • background-attachment
            • background-position
            • background-color
            • text-align
            • text-indent
            • text-decoration

1 comment:

  1. Check this course Udemy - HTML and CSS for Beginners | Know It Now (6 hours on-demand video, Full lifetime access)
    https://knowit-now.com/udemy-html-and-css-for-beginners/

    Check this one also for HTML5 Udemy - HTML5 Programming From Scratch | Know It Now (10.5 hours on-demand video, Full lifetime access)
    https://knowit-now.com/udemy-html5-programming-from-scratch/

    ReplyDelete