Posted 11:39 AM by Philippa Hoey in
How do you set the background colour of your website?
The background-color property describes the background color of elements.

The element contains all the content of an HTML document. Thus, to change the background color of an entire page, the background-color property should be applied to the element.

You can also apply background colors to other elements including headlines and text. In the example below, different background colors are applied to elements.

With CSS, a color is most often specified by:

  • HEX value - like "#ff0000"
  • an RGB value - like "rgb(255,0,0)"
  • a color name - like "red"

How do you underline text?
You can underline the text by typing in the following example,

are underlined headlines, h1 {text-decoration:underline;} or underline text

What is a pseudo-class?
A pseudo-class allows you to take into account different conditions or events when defining a property for an HTML tag.

How can you style all links on your website with a few lines of code?

Using style sheets and linking them with the content, this allows you to change the style of content without having to change each piece of content individually.


What is the Box Model?
The box model in CSS describes the boxes which are being generated for HTML-elements. The box model also contains detailed options regarding adjusting margin, border, padding and content for each element.

What are the two ways we can increase space around text?

With the width-property, you can define a certain width of an element.

div.box {
width: 200px;
border: 1px solid black;
background: orange;

}

The default indenting is 0, if you want to indent your text, you would add a positive length or percentage. If you wanted to outdent your text, you would add a negative length or percentage. For example:

blockquote { text-indent: 1em; } li { text-indent: -1em; }




0 comment(s) to... “ ”

0 comments: