fix: small language update suggestion for basic css (#16706)

pull/18182/head
Schalk Neethling 2018-02-13 11:46:48 +02:00 committed by Stuart Taylor
parent e2ec5e7427
commit d63f3e2ce6
1 changed files with 8 additions and 8 deletions

View File

@ -47,7 +47,7 @@
"description": [
"Now let's change the color of some of our text.",
"We can do this by changing the <code>style</code> of your <code>h2</code> element.",
"The style that is responsible for the color of an element's text is the \"color\" style.",
"The property that is responsible for the color of an element's text is the <code>color</color> style property.",
"Here's how you would set your <code>h2</code> element's text color to blue:",
"<code>&#60;h2 style=\"color: blue;\"&#62;CatPhotoApp&#60;/h2&#62;</code>",
"Note that it is a good practice to end inline <code>style</code> declarations with a <code>;</code> .",
@ -148,15 +148,15 @@
"title": "Use CSS Selectors to Style Elements",
"description": [
"With CSS, there are hundreds of CSS <code>properties</code> that you can use to change the way an element looks on your page.",
"When you entered <code>&#60;h2 style=\"color: red\"&#62;CatPhotoApp&#60;/h2&#62;</code>, you were giving that individual <code>h2</code> element an <code>inline style</code>.",
"That's one way to add style to an element, but there's a better way to use <code>CSS</code>, which stands for <code>Cascading Style Sheets</code>.",
"At the top of your code, create a <code>style</code> element like this:",
"When you entered <code>&#60;h2 style=\"color: red\"&#62;CatPhotoApp&#60;/h2&#62;</code>, you were styling that individual <code>h2</code> element with <code>inline CSS</code>, which stands for <code>Cascading Style Sheets</code>.",
"That's one way to specify the style of an element, but there's a better way to apply <code>CSS</code>.",
"At the top of your code, create a <code>style</code> block like this:",
"<blockquote>&#60;style&#62;<br>&#60;/style&#62;</blockquote>",
"Inside that style element, you can create a <code>CSS selector</code> for all <code>h2</code> elements. For example, if you wanted all <code>h2</code> elements to be red, your style element would look like this:",
"Inside that style block, you can create a <code>CSS selector</code> for all <code>h2</code> elements. For example, if you wanted all <code>h2</code> elements to be red, you would add a style rule that looks like this:",
"<blockquote>&#60;style&#62;<br>&nbsp;&nbsp;h2 {color: red;}<br>&#60;/style&#62;</blockquote>",
"Note that it's important to have both opening and closing curly braces (<code>{</code> and <code>}</code>) around each element's style. You also need to make sure your element's style is between the opening and closing style tags. Finally, be sure to add the semicolon to the end of each of your element's styles.",
"Note that it's important to have both opening and closing curly braces (<code>{</code> and <code>}</code>) around each element's style rule(s). You also need to make sure that your element's style definition is between the opening and closing style tags. Finally, be sure to add a semicolon to the end of each of your element's style rules.",
"<hr>",
"Delete your <code>h2</code> element's style attribute and instead create a CSS <code>style</code> element. Add the necessary CSS to turn all <code>h2</code> elements blue."
"Delete your <code>h2</code> element's style attribute, and instead create a CSS <code>style</code> block. Add the necessary CSS to turn all <code>h2</code> elements blue."
],
"challengeSeed": [
"<h2 style=\"color: red\">CatPhotoApp</h2>",
@ -273,7 +273,7 @@
"You can see that we've created a CSS class called <code>blue-text</code> within the <code>&#60;style&#62;</code> tag.",
"You can apply a class to an HTML element like this:",
"<code>&#60;h2 class=\"blue-text\"&#62;CatPhotoApp&#60;/h2&#62;</code>",
"Note that in your CSS <code>style</code> element, classes should start with a period. In your HTML elements' class declarations, classes shouldn't start with a period.",
"Note that in your CSS <code>style</code> element, class names start with a period. In your HTML elements' class attribute, the class name does not include the period.",
"<hr>",
"Inside your <code>style</code> element, change the <code>h2</code> selector to <code>.red-text</code> and update the color's value from <code>blue</code> to <code>red</code>.",
"Give your <code>h2</code> element the <code>class</code> attribute with a value of <code>'red-text'</code>."