CSS Syntax - Learn CSS Cascading Stlye Sheets

Group Info

Learn CSS Cascading Stlye Sheets

Learn CSS Cascading Stlye Sheets

C.S.S Cascading Style Sheets:

CSS describes how elements should be displayed. CSS is used for presentational effects and styles.


There are 3 Methods for Styling Elements:

1.Style Attribute (Inline Styling) (Requires Individually Styling Each Element).

2.<Style Element> Puts CSS In Every Page Inside The Header.

3.< Link /> Links To An External File.


Helpful links

CSS Tutorial W3Schools.com

Joseph Wojcicki LinkedIn

Share:
Joseph wojcicki
Joseph wojcicki Oct 22 '18

Selector{

Property:

Value;

Declaration}


Sample.....................................................................


<html>
<head>
<style>
body {
    background-color: lightblue;
}

h1 {
    color: white;
    text-align: center;
}

p {
    font-family: verdana;
    font-size: 20px;
}
</style>
</head>
<body>

<h1>My First CSS Example</h1>
<p>This is a paragraph.</p>

</body>
</html>


Joseph wojcicki
Joseph wojcicki Oct 22 '18
Everything before the { is the selector. The selector is what you are going to style.
Joseph wojcicki
Joseph wojcicki Oct 22 '18
The property is what you are changing in the selected element.
Joseph wojcicki
Joseph wojcicki Oct 22 '18
The value is what you are changing the selcted property to example (red)
Joseph wojcicki
Joseph wojcicki Oct 22 '18
Declaration is property + value combined.
Joseph wojcicki
Joseph wojcicki Oct 22 '18

What is the correct HTML for referring to an external style sheet?


<link rel="stylesheet" type="text/css" href="mystyle.css">

You need to be a group member to post.