Computer-Science-A-level-Ocr
-
3-3-networks8 主题
-
3-2-databases7 主题
-
3-1-compression-encryption-and-hashing4 主题
-
2-5-object-oriented-languages7 主题
-
2-4-types-of-programming-language4 主题
-
2-3-software-development5 主题
-
2-2-applications-generation6 主题
-
2-1-systems-software8 主题
-
1-3-input-output-and-storage2 主题
-
1-2-types-of-processor3 主题
-
1-1-structure-and-function-of-the-processor1 主题
-
structuring-your-responses3 主题
-
the-exam-papers2 主题
-
8-2-algorithms-for-the-main-data-structures4 主题
-
8-1-algorithms10 主题
-
7-2-computational-methods11 主题
-
7-1-programming-techniques14 主题
-
capturing-selecting-managing-and-exchanging-data
-
entity-relationship-diagrams
-
data-normalisation
-
relational-databases
-
hashing
-
symmetric-vs-asymmetric-encryption
-
run-length-encoding-and-dictionary-coding
-
lossy-and-lossless-compression
-
polymorphism-oop
-
encapsulation-oop
-
inheritance-oop
-
attributes-oop
-
methods-oop
-
objects-oop
-
capturing-selecting-managing-and-exchanging-data
-
6-5-thinking-concurrently2 主题
-
6-4-thinking-logically2 主题
-
6-3-thinking-procedurally3 主题
-
6-2-thinking-ahead1 主题
-
6-1-thinking-abstractly3 主题
-
5-2-moral-and-ethical-issues9 主题
-
5-1-computing-related-legislation4 主题
-
4-3-boolean-algebra5 主题
-
4-2-data-structures10 主题
-
4-1-data-types9 主题
-
3-4-web-technologies16 主题
-
environmental-effects
-
automated-decision-making
-
computers-in-the-workforce
-
layout-colour-paradigms-and-character-sets
-
piracy-and-offensive-communications
-
analysing-personal-information
-
monitoring-behaviour
-
censorship-and-the-internet
-
artificial-intelligence
-
the-regulation-of-investigatory-powers-act-2000
-
the-copyright-design-and-patents-act-1988
-
the-computer-misuse-act-1990
-
the-data-protection-act-1998
-
adder-circuits
-
flip-flop-circuits
-
simplifying-boolean-algebra
-
environmental-effects
css-styling
Writing CSS: Styling
-
CSS can be used to style individual elements e.g. all of the h1s or all the paragraphs
h1{
color:blue;
}
-
CSS can also be used to style classes by adding a . before the class name
.infoBox{
background-color: green;
}
-
Identifiers can be styled by adding a # before the identifier name
#menu{
background-color: #A2441B;
}
-
Styling can also be done inline (in the HTML). The examples below will cover both
<p style="background-color: lightblue;”> Save My Exams </p>
-
Multiple properties can be included in the styling
#header {
background-color: lightblue;
padding: 10px;
text-align: center;
}
Examiner Tips and Tricks
-
Your code must be exactly what it appears on this page. So color must be spelt the American way as colour doesn’t work in CSS. Make sure you know the properties listed below and don’t name them something which is incorrect e.g. text-colour instead of color
-
Also make sure your syntax is correct so use : instead of =
Properties
background-color
Example within HTML
<p style="background-color: lightblue;”> Save My Exams </p>
Example in external CSS
.h1{
background-color: lightblue;
}
border-color
Example within HTML
<p style="border-color: black; > Save My Exams </p>
Example in external CSS
.h1{
border-color: black;
}
border-style
Example within HTML
<p style="border-style: solid; ” > Save My Exams </p>
Example in external CSS
.h1{
border-style: solid;
}
border-width
Example within HTML
<p style="border-width: 2px; ”> Save My Exams </p>
Example in external CSS
.h1{
border-width: 2px;
}
colour
Note that this changes the font colour
Example within HTML
<p style="color: #ff0000; ”> Save My Exams </p>
Example in external CSS
.h1{
color: #ff0000;
}
font-family
Example within HTML
<p style="font-family: Arial;” > Save My Exams </p>
Example in external CSS
.h1{
font-family: Arial;
}
font-size
Example within HTML
<p style="font-size: 14px; ” > Save My Exams </p>
Example in external CSS
.h1{
font-size: 14px;
}
height & width
Example within HTML
<p style="height: 200px; width: 200px;” > Save My Exams </p>
Example in external CSS
.h1{
height: 200px;
width: 200px;
}
Colours
-
Colours can be referred to by name or hex number
-
Colour is spelt the American way in CSS (color) – the code won’t work if written the British way (colour)
-
There are 140 colour names (opens in a new tab) which can be used. Here is a selection:

-
Colours can also be given using a hex code e.g. #9ACD32
-
Every 2 characters in the hex colour code represent either red, green or blue
-
E.g. Red is #FF0000
-
Green is #00FF00
-
Blue is #0000FF
-
A colour picker (opens in a new tab) can be used to get the hex code for a particular colour
-
Worked Example
The site also contains the following code.<div class="offer">All oranges 50% off.</div>
Complete the CSS code that would make any div elements of the class offer have an orange border.
2 marks
..........{ border-style: solid;
..........
}
How to answer the question:
The styling will apply to the div elements of the class offer. This is done using the .div name so .offer
It needs to have an orange border. The property for this is border-color so border-colour: orange
Answer:
The correct answer:
.offer{
border-style: solid;
border-color: orange;
}
Responses