GoConqr has a new look! Let us know what you think.

Flashcards

2. JavaScript in HTML

Ioana Cosmina JavaScript English 15 cards

Cards in this deck (15)

  1. 1The elementThe primary method of inserting JS into an HTML page
  2. 2What are the most used attributes of ?async
    defer
    src
    type
  3. 3Which attributes of are deprecated?charset
    language
  4. 4asyncThe script should begin downloading immediately but should not prevent other actions on the page. Valid only for external script files.
  5. 5deferThe script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded. Valid only for external script files.
  6. 6typeIndicates the type of script represented:
    - omitted or JS MIME type
    - module
    - any other value
  7. 7How do you include inline JS code?function sayHi() {
    alert("Hi!");
    }
    <script>
  8. 8How do you include external JS code?
  9. 9How are elements interpreted?In the order in which they appear in the page so long as the defer and async attributes are not present.
  10. 10When is a deffered script executed?After the browser has received the closing html tag.
  11. 11When is an async script executed?Before the page's load event and before or after DOMContentLoaded.
  12. 12What are the 3 advantages of using external files vs inline code?Maintainablity
    Caching
    Future-proof
  13. 13Quirks modeWhen doctype is missing at the beginning of the document. Bad practice!
  14. 14elementThe content inside will be displayed only if the browser doesn't support scripting or the scripting support is turned off.
  15. 15Why is it a good practice to place elements towards the end of the page?The browser must complete interpretation of the code inside, before it can continue rendering the rest of the page. Exception: defer and async

Information

Description
JavaScript Flashcards on 2. JavaScript in HTML, created by Ioana Cosmina on 23/01/2020.
Created by
Ioana Cosmina
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?