WEB-DEVELOPMENT-APPLICATIONS practice question 18 of 25
Which HTML elements support the `` tag to invoke JavaScript code? Choose 2 answers:
Full set: 131 questionsThe HTML <script> tag is used to embed or reference executable JavaScript code. According to the HTML specification, it is valid to place <script> elements inside either the or the of the document. Placing scripts in the can block page rendering while they are fetched and executed. A common performance practice is to place them just before the closing tag to allow the main HTML content to be parsed and displayed first.
C. form: The <script> tag is not a permitted content model for the element. It should contain flow content, but not scripting elements directly.
D. meta: The tag is a void (or empty) element and cannot contain any content, including a <script> tag.
E. title: The
1. Mozilla Developer Network (MDN). (2023). <script>: The Script element. In HTML: HyperText Markup Language. Section: "Usage notes". Retrieved from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
2. WHATWG. (2024). HTML Living Standard. Section 4.12.1 "The script element". Retrieved from https://html.spec.whatwg.org/multipage/scripting.html#the-script-element
3. W3C. (2021). HTML 5.2 Recommendation. Section 4.3.1 "The script element". Retrieved from https://www.w3.org/TR/html52/semantics-scripting.html#the-script-element
Keep practicing
Take the free WEB-DEVELOPMENT-APPLICATIONS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other WEB-DEVELOPMENT-APPLICATIONS practice questions
- Question 1Given the following JavaScript code: ```javascript var n1 = 10; var n2 = "20.39"; ``` Whi…
- Question 2Which attribute displays help text in an input field without specifying an actual value f…
- Question 4Which element attaches an external CSS document to a web page?
- Question 5Which HTML tag should a developer use to create a drop-down list?
- Question 6Which method allows the end user to enter text as an answer to a question as the page loa…
- Question 8Which layout design is easiest to manage on a variety of devices?
