FWP Prelims Reviewer Handout 3
FWP Prelims Reviewer Handout 3
CSS Syntax
- “cascading” means that styles are applied in the order they are encountered by the
browser. From top to the bottom of the style sheet.
- uses codes to define the styles to be applied to each element in a webpage.
- Style sheet is the collection of code statements.
o Syntax:
- <link> tag uses the href attribute which refers to the relative or absolute URL of the
file.
Styling Text
- can have the biggest impact on the general design of the website.
- Traditionally web-safe fonts include Arial, Courier New, Georgia, Verdana, and New
Times Roman.
- In CSS, the font-family property is used to define the font.
o It is a comma-separated list of fonts from highest to lowest priority.
o This process is called font stack.
Sizing Text
- Text can be resized using the font-size property.
- Pixels (px) is a fixed measurement that gives designer the most control over size.
- Percentage (%) has a default size of 16px.
Formatting Text
o font-weight – allows the application of different boldness to the text including
normal is the unbold text, lighter which is the thinner than normal weight, bold
creates darker text, and bolder makes text thicker than the bold weight. Uses
font-weight: value; as descriptor.
o font-style – this property italicized text. It includes normal, straight text, italic,
oblique. It uses font-style: value; as its descriptor.
o text-decoration – allows emphasis lines to text. It includes none means no
change, underline to add a line under the text, overline adds line over the text,
and line-through same as strike. It uses text-decoration: value; as its descriptor.
o text-align – aligns the text horizontally. Uses text-align: value; as its descriptor.
Values include left, right, center, and justify.
Adding Colors
- RGB: a comma-separated list of amounts of red, green, and blue in a color, ranging
from 0 to 255.
- Hexadecimal (hex) values: a six-character code that defines the RGB in a color
preceded by a #.
- Color names: a set of predefined names for colors. The easier method to use.
Background Property
- This adds an image or a color to the background of the webpage.
- Background image can be set in Horizontal or vertical views.
- Uses background-image: value; as its descriptor. Value is the link of the image.
- background-repeat: no-repeat sets the background without repetition.
- repeat-x and repeat-y repeat the background horizontally or vertically.
Box Model
- refers to how CCS sees every HTML element as if it is in its own box.
- “box” contains, borders, paddings, margins and content.
Border
- Can be put on all four sides or put individually on any side.
- Can be also modified using colors, styles, widths, radius, and padding.
- Margin is the property that adds spacing around the content.
- Padding adds spacing within the elements or white space inside the container.
Style has following values and border styles:
Dotted – consist of rounded dots that display on a border.
Solid – a single, straight and solid border.
Dashed – short dashes or line segments.
Double – two-line solid border.
Groove – a three-dimensional border that looks like it is carved.
Ridge – a three-dimensional border that is opposite of the groove style.
Inset – makes content in the border look like it is coming inside od the
canvas.
Outset – makes the content in the border look it is coming outside of the
canvas.