Skip to content

Commit

Permalink
Merge pull request #22442 from Eduardo06sp/fix/formatting-issues
Browse files Browse the repository at this point in the history
Combine consecutive blockquotes into one
  • Loading branch information
ZachBaird authored Jul 14, 2021
2 parents 7262fa5 + e3dc766 commit db45a1b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions foundations/javascript_basics/DOM-manipulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ Keep in mind that the JavaScript does _not_ alter your HTML, but the DOM - your

> **Important note:**
> Your JavaScript, for the most part, is run whenever the JS file is run, or when the script tag is encountered in the HTML. If you are including your JavaScript at the top of your file, many of these DOM manipulation methods will not work because the JS code is being run *before* the nodes are created in the DOM. The simplest way to fix this is to include your JavaScript at the bottom of your HTML file so that it gets run after the DOM nodes are parsed and created.
>
> Alternatively, you can link the JavaScript file in the `<head>` of your HTML document. Use the `<script>` tag with the `src` attribute containing the path to the JS file, and include the `defer` keyword to load the file *after* the HTML is parsed, as such:
~~~html
<head>
<script src="js-file.js" defer></script>
</head>
~~~

>
>~~~html
><head>
> <script src="js-file.js" defer></script>
></head>
>~~~
>
> Read the second bullet point in [this MDN article](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML#applying_css_and_javascript_to_html) for more information, which also includes a link to additional script loading strategies.
### Exercise
Expand Down

0 comments on commit db45a1b

Please sign in to comment.