You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn/solutions.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Task: Write a declaration in a new rule that will reset the background color bac
10
10
11
11
One possible solution is as follows:
12
12
13
-
```
13
+
```css
14
14
#outer#innera {
15
15
background-color: initial;
16
16
}
@@ -28,7 +28,7 @@ Task: Target the `<a>` element with a title attribute and make the border pink (
28
28
29
29
To select elements with a title attribute we can add `title` inside the square brackets, which will select the second link, which is the only one with a title attribute.
30
30
31
-
```
31
+
```css
32
32
a[title] {
33
33
border-color: pink;
34
34
}
@@ -38,7 +38,7 @@ Target the `<a>` element with an href attribute which contains the word contact
38
38
39
39
There are two things we want to match here, the href value "/contact" and also "../contact". So we need to match the string "contact" anywhere in the value using `*=`. This will select the third and fourth links.
40
40
41
-
```
41
+
```css
42
42
a[href*="contact"] {
43
43
border-color: orange;
44
44
}
@@ -48,7 +48,7 @@ Target the `<a>` element with an href value starting with https and give it a gr
48
48
49
49
Here we can look for an href value which starts with "https" and so use `^=`, this will only select the first link.
50
50
51
-
```
51
+
```css
52
52
a[href^="https"] {
53
53
border-color: green;
54
54
}
@@ -60,7 +60,7 @@ a[href^="https"] {
60
60
61
61
Task: Change the size of the second box (by adding CSS to the .alternate class) to make it match the first box in width and height.
62
62
63
-
```
63
+
```css
64
64
.alternate {
65
65
box-sizing: border-box;
66
66
width: 390px;
@@ -74,7 +74,7 @@ You will need to increase the height and width of the second block, to add the s
74
74
75
75
To style the box we add a border, using the `border` property. Round the corners with `border-radius` and then add the background image setting the size to `contain`.
76
76
77
-
```
77
+
```css
78
78
.box {
79
79
border: 5pxsolid#000;
80
80
border-radius: 10px;
@@ -85,7 +85,7 @@ To style the box we add a border, using the `border` property. Round the corners
85
85
86
86
We've used {{CSSXref("color_value/rgb", "rgb()")}} colors to add a background color to the heading which is semi-transparent.
Copy file name to clipboardExpand all lines: learn/tasks/backgrounds/marking.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The aim of the tasks are to demonstrate an understanding of the properties cover
6
6
7
7
This task covers understanding of `border`, `border-radius`, `background-image`, and `background-size`. Also, it checks that the student understands how to use RGB colors to make a background color partly transparent.
8
8
9
-
```
9
+
```css
10
10
.box {
11
11
border: 5pxsolid#000;
12
12
border-radius: 10px;
@@ -33,7 +33,7 @@ There are also some elements which link back to earlier lessons:
33
33
- They need to add padding to the heading in order that it doesn't overlay the star image - this links back to learning from the earlier Box Model lesson.
34
34
- The text with be aligned with the `text-align` property.
Copy file name to clipboardExpand all lines: learn/tasks/values/marking.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The student needs to take a color which is a hex code and add the same color to
6
6
7
7
They have a link to [a color conversion tool](https://convertingcolors.com/hex-color-86DEFA.html), so they just need to know what the different values look like.
8
8
9
-
```
9
+
```css
10
10
.hex {
11
11
background-color: #86DEFA;
12
12
}
@@ -28,7 +28,7 @@ They have a link to [a color conversion tool](https://convertingcolors.com/hex-c
28
28
29
29
The student is asked to use a variety of length units to size some boxes.
30
30
31
-
```
31
+
```css
32
32
h1 {
33
33
font-size: 50px;
34
34
}
@@ -50,7 +50,7 @@ h1+p {
50
50
51
51
In this task the students needs to use a keyword and a percentage to change the position of the background image.
0 commit comments