b) External file specified by the src attribute of a “script” tag
c) By using a header tag
d) By using body tag
- Inline, between a pair of “script” tags
- From an external file specified by the src attribute of a “script” tag
- In an HTML event handler attribute, such as onclick or onmouseover
a) Between the “script” tag
b) Outside the “script” tag
c) Between or Outside the “script” tag
d) Between the header tag
4. Which is the root element in a HTML document?
5. What is the code for getting the current time?
a) now = new Date(); b) var now = new Date(); c) var now = Date(); d) var now = new Date(current);
6. What is the code to start displaying the time when document loads?
a) onload = displayTime; b) window. = displayTime; c) window.onload = displayTime; d) window.onload = start;
Explanation: window.onload is used to access the screen while the page is loading. The above code starts displaying the time when the document loads.
7. One of the main advantage of using src attribute is
a) It becomes self-cached
b) It makes the HTML file modular
c) It restricts manipulation in the HTML file
d) It simplifies the HTML files
a) Downloads that many times
b) Retrives from the browser cache
c) Must be re executed
d) Must be included in all the pages
9. What is the default value of the type attribute?
10. The language is commonly used to
a) Specify the user’s language
b) Specify the language going to be scripted
c) No longer in use
d) Specify the programmer’s favourable language
Explanation: The language attribute specifies the natural language of the content of a web page. The language attribute is deprecated and should no longer be used.