learning-journal

102-Learning journal

This project is maintained by cmboell

Design Webpages With CSS

CSS(Cascading Style Sheets) is a programming language used to add style and design to the elements of a webpage. By using selectors that identify with the HTML you want to apply style to using ‘{ }’ (curly brackets) and putting the stylization ques in between them you are able to style elements. A colon goes between the value and property, while a semi-colon goes at the end of each property. You may put multiple styling effects between the curly brackets.

HTML & CSS: Design and build websites by Jon Duckett

Chapter 10: Introducing CSS

HTML flows within invisible boxes, whether they be block or inline elements. CSS allows you to create rules that control the way that each individual box (and the contents of that box) is presented. We used CSS to control the stylization of each box. Example of a CSS style:

‘h1{ font-size: 10px;

color: #000000; }'

CSS works by associating rules with HTML elements. These rules govern how the content of specified elements should be displayed. A CSS rule contains two parts: a selector and a declaration. In the above example h1 would be the selector and font-size would be a declaration.

CSS declarations sit inside curly brackets and each is made up of two parts: a property and a value, separated by a colon. You can specify several properties in one declaration, each separated by a semi-colon. In the above example color would be a property and #000000 would be the value.

Different Types of CSS

You can use CSS in three different ways: Externally, Internally, and Embedded

CSS Selectors

Cascading

The word cascading refers to the order in which competing style rules are applied. If two style rules have the same property and are created using the same selector, the last one in the code will be applied.

Chapter 11: Color

There are multiple ways you can add and specify color using CSS: Way Example

You can use colors to change text, background, and borders. Using a color picker can help you find the color you are looking for. There are 100 predefined color names. Using RGB or Hexadecimal values can broaden your color range (16 million color combonations.) By using HSL value you can control the hue, saturation, and lighness of the colors. When choosing colors for your webpage it is important to understand the flow of your color scheme. Your webpage should be readable. Using light background with dark text is a good practice. A good color scheme for your webpage should make it easy to read and accessable for everyone who visits.

Back To Home