diff --git a/files/en-us/learn/css/building_blocks/backgrounds_and_borders/index.md b/files/en-us/learn/css/building_blocks/backgrounds_and_borders/index.md index 91aa412fac19ad0..af88c3c27b17431 100644 --- a/files/en-us/learn/css/building_blocks/backgrounds_and_borders/index.md +++ b/files/en-us/learn/css/building_blocks/backgrounds_and_borders/index.md @@ -296,7 +296,7 @@ We have set all four corners in the example below and then changed the values fo ## Test your skills! -You've reached the end of this article, but can you remember the most important information? You can find some further tests to verify that you've retained this information before you move on — see [Test your skills: Backgrounds and Borders](/en-US/docs/Learn/CSS/Building_blocks/Test_your_skills_backgrounds_and_borders). +You've reached the end of this article, but can you remember the most important information? You can find some further tests to verify that you've retained this information before you move on — see [Test your skills: Backgrounds and borders](/en-US/docs/Learn/CSS/Building_blocks/Test_your_skills_backgrounds_and_borders). ## Summary diff --git a/files/en-us/learn/css/building_blocks/box_model_tasks/index.md b/files/en-us/learn/css/building_blocks/box_model_tasks/index.md index 88d45bcebf22309..84a0bb3a4cc22db 100644 --- a/files/en-us/learn/css/building_blocks/box_model_tasks/index.md +++ b/files/en-us/learn/css/building_blocks/box_model_tasks/index.md @@ -1,21 +1,26 @@ --- -title: 'Test your skills: The Box Model' +title: 'Test your skills: The box model' slug: Learn/CSS/Building_blocks/Box_Model_Tasks tags: - Beginner - CSS + - Learn + - Box model + - test your skills --- {{LearnSidebar}} -The aim of this task is to help you check your understanding of the CSS Box Model. +The aim of this skill test is to assess whether you understand the [CSS box model](/en-US/docs/Learn/CSS/Building_blocks/The_box_model). -> **Note:** You can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. +> **Note:** You can try out solutions in the interactive editors below. However, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. > > If you get stuck, then ask us for help — see the [Assessment or further help](#assessment_or_further_help) section at the bottom of this page. -## The Box Model One +## Task 1 -With the two boxes below, one is using the standard box model, the other the alternate box model. Change the width of the second box by adding rules to the .alternate class, so that it matches the visual width of the first box. Your final result will look like the image below. +In this task, there are two boxes below, one is using the standard box model, the other the alternate box model. Change the width of the second box by adding declarations to the `.alternate` class, so that it matches the visual width of the first box. + +Your final result should look like the image below: ![Two boxes of the same size](mdn-box-model1.png) @@ -25,9 +30,9 @@ Try updating the live code below to recreate the finished example: > **Callout:** > -> For assessment or further work purposes, [download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/box-model/box-models-download.html) to work in your own editor or in an online editor. +> [Download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/box-model/box-models-download.html) to work in your own editor or in an online editor. -## The Box Model Two +## Task 2 In this task, add to the box: @@ -38,19 +43,23 @@ In this task, add to the box: - A left margin of 2em. - Padding on all sides of 1em. +Your final result should look like the image below: + ![A box with a dotted border](mdn-box-model2.png) -Try updating the live code below to recreate the example as displayed in the image: +Try updating the live code below to recreate the finished example: {{EmbedGHLiveSample("css-examples/learn/tasks/box-model/mbp.html", '100%', 600)}} > **Callout:** > -> For assessment or further work purposes, [download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/box-model/mbp-download.html) to work in your own editor or in an online editor. +> [Download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/box-model/mbp-download.html) to work in your own editor or in an online editor. + +## Task 3 -## The Box Model Three +In this task, the inline element has a margin, padding and border. However, the lines above and below are overlapping it. What can you add to your CSS to cause the size of the margin, padding, and border to be respected by the other lines, while still keeping the element inline? -In this example the inline element has a margin, padding and border; however, the lines above and below are overlapping it. What can you add to your CSS to cause the size of the margin, padding, and border to be respected by the other lines, while still keeping the element inline? +Your final result should look like the image below: ![An inline box with space between it and the text around it.](mdn-box-model3.png) @@ -60,7 +69,7 @@ Try updating the live code below to recreate the finished example: > **Callout:** > -> For assessment or further work purposes, [download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/box-model/inline-block-download.html) to work in your own editor or in an online editor. +> [Download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/box-model/inline-block-download.html) to work in your own editor or in an online editor. ## Assessment or further help @@ -71,7 +80,7 @@ If you would like your work assessed, or are stuck and want to ask for help: 1. Put your work into an online shareable editor such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/). You can write the code yourself, or use the starting point files linked to in the above sections. 2. Write a post asking for assessment and/or help at the [MDN Discourse forum Learning category](https://discourse.mozilla.org/c/mdn/learn/250). Your post should include: - - A descriptive title such as "Assessment wanted for Box Model skill test 1". + - A descriptive title such as "Assessment wanted for the box model skill test 1". - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. - A link to the example you want to be assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. - A link to the actual task or assessment page, so we can find the question you want help with. diff --git a/files/en-us/learn/css/building_blocks/cascade_tasks/index.md b/files/en-us/learn/css/building_blocks/cascade_tasks/index.md index a5ac5e5419fbca2..45f4da325a77475 100644 --- a/files/en-us/learn/css/building_blocks/cascade_tasks/index.md +++ b/files/en-us/learn/css/building_blocks/cascade_tasks/index.md @@ -4,28 +4,33 @@ slug: Learn/CSS/Building_blocks/Cascade_tasks tags: - Beginner - CSS + - Learn + - Cascade + - test your skills --- {{LearnSidebar}} -The aim of this task is to help you check your understanding of the universal property values for controlling inheritance that we looked at in the lesson on [The Cascade and Inheritance](/en-US/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance). +The aim of this skill test is to assess whether you understand universal property values for [controlling inheritance in CSS](/en-US/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance). -> **Note:** You can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. +> **Note:** You can try out solutions in the interactive editors below. However, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. > > If you get stuck, then ask us for help — see the [Assessment or further help](#assessment_or_further_help) section at the bottom of this page. -## Task One +## Task -In this task, you need to use one of the special values we looked at in the [Controlling inheritance](/en-US/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance#controlling_inheritance) section to write a declaration in a new rule that will reset the background color back to white, without using an actual color value. +In this task, we want you to use one of the special values we looked at in the [controlling inheritance](/en-US/docs/Learn/CSS/Building_blocks/Cascade_and_inheritance#controlling_inheritance) section to write a declaration in a new rule that will reset the background color back to white, without using an actual color value. + +Your final result should look like the image below: ![Barely visible yellow links on a white background.](mdn-cascade.png) -In the example below see if you can match the image above. +Try updating the live code below to recreate the finished example: {{EmbedGHLiveSample("css-examples/learn/tasks/cascade/cascade.html", '100%', 700)}} > **Callout:** > -> For assessment or further work purposes, [download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/cascade/cascade-download.html) to work in your own editor or in an online editor. +> [Download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/cascade/cascade-download.html) to work in your own editor or in an online editor. ## Assessment or further help @@ -36,7 +41,7 @@ If you would like your work assessed, or are stuck and want to ask for help: 1. Put your work into an online shareable editor such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/). You can write the code yourself, or use the starting point files linked to in the above sections. 2. Write a post asking for assessment and/or help at the [MDN Discourse forum Learning category](https://discourse.mozilla.org/c/mdn/learn/250). Your post should include: - - A descriptive title such as "Assessment wanted for Cascade skill test 1". + - A descriptive title such as "Assessment wanted for the cascade skill test". - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. - A link to the example you want to be assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. - A link to the actual task or assessment page, so we can find the question you want help with. diff --git a/files/en-us/learn/css/building_blocks/cascade_tasks/mdn-cascade.png b/files/en-us/learn/css/building_blocks/cascade_tasks/mdn-cascade.png index 1448d3ce5f90944..255ee0fccd33c16 100644 Binary files a/files/en-us/learn/css/building_blocks/cascade_tasks/mdn-cascade.png and b/files/en-us/learn/css/building_blocks/cascade_tasks/mdn-cascade.png differ diff --git a/files/en-us/learn/css/building_blocks/handling_different_text_directions/index.md b/files/en-us/learn/css/building_blocks/handling_different_text_directions/index.md index 7cbca3bbea93e56..24ba510504df317 100644 --- a/files/en-us/learn/css/building_blocks/handling_different_text_directions/index.md +++ b/files/en-us/learn/css/building_blocks/handling_different_text_directions/index.md @@ -135,7 +135,7 @@ The logical properties and values are newer than their physical equivalents, and ## Test your skills! -You've reached the end of this article, but can you remember the most important information? You can find some further tests to verify that you've retained this information before you move on — see [Test your skills: Writing Modes and Logical Properties](/en-US/docs/Learn/CSS/Building_blocks/Writing_Modes_Tasks). +You've reached the end of this article, but can you remember the most important information? You can find some further tests to verify that you've retained this information before you move on — see [Test your skills: Writing modes and logical properties](/en-US/docs/Learn/CSS/Building_blocks/Writing_Modes_Tasks). ## Summary diff --git a/files/en-us/learn/css/building_blocks/images_media_form_elements/index.md b/files/en-us/learn/css/building_blocks/images_media_form_elements/index.md index 0f745608825716d..ab346d56b45641b 100644 --- a/files/en-us/learn/css/building_blocks/images_media_form_elements/index.md +++ b/files/en-us/learn/css/building_blocks/images_media_form_elements/index.md @@ -191,7 +191,7 @@ For further information on styling forms, take a look at the two articles in the ## Test your skills! -You've reached the end of this article, but can you remember the most important information? You can find some further tests to verify that you've retained this information before you move on — see [Test your skills: Images and Form elements](/en-US/docs/Learn/CSS/Building_blocks/Images_tasks). +You've reached the end of this article, but can you remember the most important information? You can find some further tests to verify that you've retained this information before you move on — see [Test your skills: Images and form elements](/en-US/docs/Learn/CSS/Building_blocks/Images_tasks). ## Summary diff --git a/files/en-us/learn/css/building_blocks/images_tasks/index.md b/files/en-us/learn/css/building_blocks/images_tasks/index.md index fcc8e213494d4d0..0a54e3851e05f07 100644 --- a/files/en-us/learn/css/building_blocks/images_tasks/index.md +++ b/files/en-us/learn/css/building_blocks/images_tasks/index.md @@ -1,50 +1,58 @@ --- -title: 'Test your skills: Images and Form elements' +title: 'Test your skills: Images and form elements' slug: Learn/CSS/Building_blocks/Images_tasks tags: - Beginner - CSS + - Learn + - Images + - Form + - test your skills --- {{LearnSidebar}} -The aim of this task is to help you check your understanding of some of the values and units that we looked at in the lesson on [Images, Media and Form elements](/en-US/docs/Learn/CSS/Building_blocks/Images_media_form_elements). +The aim of this skill test is to assess whether you understand how special elements like [images, media and form elements are treated in CSS](/en-US/docs/Learn/CSS/Building_blocks/Images_media_form_elements). -> **Note:** You can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. +> **Note:** You can try out solutions in the interactive editors below. However, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. > > If you get stuck, then ask us for help — see the [Assessment or further help](#assessment_or_further_help) section at the bottom of this page. -## Task One +## Task 1 In this task, you have an image that is overflowing the box. We want the image to scale down to fit inside the box without any extra white space, but we do not mind if some part of the image is cropped. +Your final result should look like the image below: + ![An image in a box](mdn-images-object-fit.png) -In the example below see if you can match the image above. +Try updating the live code below to recreate the finished example: {{EmbedGHLiveSample("css-examples/learn/tasks/images/object-fit.html", '100%', 1000)}} > **Callout:** > -> For assessment or further work purposes, [download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/images/object-fit-download.html) to work in your own editor or in an online editor. +> [Download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/images/object-fit-download.html) to work in your own editor or in an online editor. -## Task Two +## Task 2 -In this task, you have a simple form. Your task is to make the following changes to the way this form looks: +In this task, you have a simple form. Your task is to make the following changes: -- Use attribute selectors to target the search field and button inside .myform. +- Use attribute selectors to target the search field and button inside `.myform`. - Make the form field and button use the same text size as the rest of the form. - Give the form field and button 10 px of padding. -- Give the button a purple background (I used `rebeccapurple`), white foreground, no border and rounded corners of 5px. +- Give the button a background of `rebeccapurple`, white foreground, no border and rounded corners of 5px. + +Your final result should look like the image below: ![A single line form](mdn-images-form.png) -Try updating the live code below to recreate the example as displayed in the image: +Try updating the live code below to recreate the finished example: {{EmbedGHLiveSample("css-examples/learn/tasks/images/form.html", '100%', 600)}} > **Callout:** > -> For assessment or further work purposes, [download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/images/form-download.html) to work in your own editor or in an online editor. +> [Download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/images/form-download.html) to work in your own editor or in an online editor. ## Assessment or further help @@ -55,7 +63,7 @@ If you would like your work assessed, or are stuck and want to ask for help: 1. Put your work into an online shareable editor such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/). You can write the code yourself, or use the starting point files linked to in the above sections. 2. Write a post asking for assessment and/or help at the [MDN Discourse forum Learning category](https://discourse.mozilla.org/c/mdn/learn/250). Your post should include: - - A descriptive title such as "Assessment wanted for Images skill test 1". + - A descriptive title such as "Assessment wanted for images and form elements skill test 1". - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. - A link to the example you want to be assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. - A link to the actual task or assessment page, so we can find the question you want help with. diff --git a/files/en-us/learn/css/building_blocks/overflow_tasks/index.md b/files/en-us/learn/css/building_blocks/overflow_tasks/index.md index 993438deb2aafa4..fff94aca3e46cda 100644 --- a/files/en-us/learn/css/building_blocks/overflow_tasks/index.md +++ b/files/en-us/learn/css/building_blocks/overflow_tasks/index.md @@ -4,18 +4,21 @@ slug: Learn/CSS/Building_blocks/Overflow_Tasks tags: - Beginner - CSS + - Learn + - Overflow + - test your skills --- {{LearnSidebar}} -The aim of these tasks is to help you check your understanding of overflow in CSS. +The aim of this skill test is to assess whether you understand [overflow in CSS and how to manage it](/en-US/docs/Learn/CSS/Building_blocks/Overflowing_content). -> **Note:** You can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. +> **Note:** You can try out solutions in the interactive editors below. However, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. > > If you get stuck, then ask us for help — see the [Assessment or further help](#assessment_or_further_help) section at the bottom of this page. -## Task One +## Task 1 -The content is overflowing the box because it has a fixed height. Keep the height but cause the box to have scrollbars only if there is enough text to cause an overflow. Test by removing some of the text from the HTML, that if there is only a small amount of text that does not overflow, no scrollbar appears. +In this task, the content is overflowing the box because it has a fixed height. Keep the height but cause the box to have scrollbars only if there is enough text to cause an overflow. Test by removing some of the text from the HTML, that if there is only a small amount of text that does not overflow, no scrollbar appears. ![A small box with a border and a vertical scrollbar.](mdn-overflow1.png) @@ -25,21 +28,23 @@ Try updating the live code below to recreate the finished example: > **Callout:** > -> For assessment or further work purposes, [download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/overflow/overflow-scroll-download.html) to work in your own editor or in an online editor. +> [Download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/overflow/overflow-scroll-download.html) to work in your own editor or in an online editor. -## Task Two +## Task 2 -In this task an image is in the box, it is bigger than the dimensions of the box so overflows visibly. Change it so that any image outside of the box is hidden. +In this task, there is an image in the box that is bigger than the dimensions of the box so that it overflows visibly. Change it so that any image outside of the box is hidden. + +Your final result should look like the image below: ![A box with an image which fills the box but does not spill out the edges.](mdn-overflow2.png) -Try updating the live code below to recreate the example as displayed in the image: +Try updating the live code below to recreate the finished example: {{EmbedGHLiveSample("css-examples/learn/tasks/overflow/overflow-hidden.html", '100%', 1200)}} > **Callout:** > -> For assessment or further work purposes, [download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/overflow/overflow-hidden-download.html) to work in your own editor or in an online editor. +> [Download the starting point for this task](https://github.com/mdn/css-examples/blob/main/learn/tasks/overflow/overflow-hidden-download.html) to work in your own editor or in an online editor. ## Assessment or further help @@ -50,7 +55,7 @@ If you would like your work assessed, or are stuck and want to ask for help: 1. Put your work into an online shareable editor such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/). You can write the code yourself, or use the starting point files linked to in the above sections. 2. Write a post asking for assessment and/or help at the [MDN Discourse forum Learning category](https://discourse.mozilla.org/c/mdn/learn/250). Your post should include: - - A descriptive title such as "Assessment wanted for Overflow skill test 1". + - A descriptive title such as "Assessment wanted for overflow skill test 1". - Details of what you have already tried, and what you would like us to do, e.g. if you are stuck and need help, or want an assessment. - A link to the example you want to be assessed or need help with, in an online shareable editor (as mentioned in step 1 above). This is a good practice to get into — it's very hard to help someone with a coding problem if you can't see their code. - A link to the actual task or assessment page, so we can find the question you want help with. diff --git a/files/en-us/learn/css/building_blocks/selectors/selectors_tasks/index.md b/files/en-us/learn/css/building_blocks/selectors/selectors_tasks/index.md index 3aa5416a70279fd..5846143a11575d8 100644 --- a/files/en-us/learn/css/building_blocks/selectors/selectors_tasks/index.md +++ b/files/en-us/learn/css/building_blocks/selectors/selectors_tasks/index.md @@ -4,22 +4,27 @@ slug: Learn/CSS/Building_blocks/Selectors/Selectors_Tasks tags: - Beginner - CSS + - Learn + - Selectors + - test your skills --- {{LearnSidebar}} -The aim of this task is to help you check your understanding of selectors in CSS. +The aim of this skill test is to assess whether you understand [CSS selectors](/en-US/docs/Learn/CSS/Building_blocks/Selectors). -> **Note:** You can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. +> **Note:** You can try out solutions in the interactive editors below. However, it may be helpful to download the code and use an online tool such as [CodePen](https://codepen.io/), [jsFiddle](https://jsfiddle.net/), or [Glitch](https://glitch.com/) to work on the tasks. > > If you get stuck, then ask us for help — see the [Assessment or further help](#assessment_or_further_help) section at the bottom of this page. -## Selectors One +## Task 1 -Without changing the HTML, use CSS to do the following things: +In this task, use CSS to do the following things, without changing the HTML: -- Make h1 headings blue. -- Give h2 headings a blue background and white text. -- Cause text wrapped in a span to have a font-size of 200%. +- Make `
` elements should be 16 pixels. +- A `
` element that is directly after an `