mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): correct errors in html fundamentals lectures (#67529)
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ Even though the `div` element is commonly used in real world codebases, you shou
|
||||
|
||||
For example, if you wanted to divide up your content into sections, then the `section` element would be more appropriate than a `div` element.
|
||||
|
||||
Add another `section` element below the first one. Then inside of the `section` element, a `h2` and `p` elements. You can use whatever text you like and you will see the changes in the preview window. To interact with the example, you will need to enable the interactive editor.
|
||||
Add another `section` element below the first one. Then inside of the `section` element, add an `h2` and a `p` element. You can use whatever text you like and you will see the changes in the preview window. To interact with the example, you will need to enable the interactive editor.
|
||||
|
||||
:::interactive_editor
|
||||
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ If you wanted to add multiple class names to an element, you can do so by separa
|
||||
<div class="box red-box"></div>
|
||||
```
|
||||
|
||||
Here is an another example of applying multiple classes to multiple `div` elements.
|
||||
Here is another example of applying multiple classes to multiple `div` elements.
|
||||
|
||||
**NOTE**: Some CSS has been provided for you in this interactive example. Don't worry about trying to understand the CSS code because you will learn more about that in future lessons. But if you wanted to change the color of the first and third boxes, enable the interactive editor and click on the `styles.css` tab and change the `background-color: red;` to `background-color: black;`.
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ Let's say you wanted to display the text `This is an <img/> element` on the scre
|
||||
|
||||
When the HTML parser sees the less than (`<`) symbol followed by an HTML tag name, it interprets that as an HTML element. That is why you are not getting the desired result of `This is an <img/> element` on the screen.
|
||||
|
||||
To fix this issue, you can use HTML entities. Here is an updated example using the correct HTML entities for the less (`<`) than and greater than (`>`) symbols. Now you should see `This is an <img/> element` on the screen.
|
||||
To fix this issue, you can use HTML entities. Here is an updated example using the correct HTML entities for the less-than (`<`) and greater-than (`>`) symbols. Now you should see `This is an <img/> element` on the screen.
|
||||
|
||||
Enable the interactive editor and try adding a `<p>learning is fun</p>` below the paragraph element. You should see `<p>learning is fun</p>` on the screen.
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ The `div` attribute.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Look out for the attribute that specifies the JavaScript file location/
|
||||
Look out for the attribute that specifies the JavaScript file location.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user