DHTML

DHTML

Test your DHTML knowledge with free quizzes on MyCodeSkills covering core concepts.


  1. Which CSS unit is relative to the root element's font size?

    • em
    • rem
    • %
    • px
  2. Which HTML tag is used to embed JavaScript?

    • <js>
    • <javascript>
    • <script>
    • <code>
  3. Which of the following is a Boolean value in JavaScript?

    • true/false
    • yes/no
    • 1/0
    • on/off
  4. Which method is used to write content directly into the HTML document?

    • write()
    • print()
    • document.write()
    • innerHTML
  5. What is the default position value in CSS?

    • static
    • fixed
    • relative
    • absolute
  6. Which property is used in JavaScript to change the content of an element?

    • innerText
    • innerHTML
    • textValue
    • nodeValue
  7. Which method attaches an event handler to an element in modern JavaScript?

    • attach()
    • addEventListener()
    • eventHandler()
    • onEvent()
  8. Which JavaScript function repeats execution after a fixed time interval?

    • setTimeout()
    • setInterval()
    • repeat()
    • loop()
  9. In DHTML, image rollovers are created using:

    • HTML only
    • CSS only
    • JavaScript events
    • PHP functions
  10. Which object represents the structure of a web page in DHTML?

    • DOM
    • BOM
    • CSSOM
    • JSON
  11. Which method is used to dynamically create a new HTML element?

    • createNode()
    • createElement()
    • newElement()
    • appendElement()
  12. The parent node of all elements in the DOM is:

    • <body>
    • <html>
    • document
    • window
  13. Which JavaScript event is best for validating form inputs as the user types?

    • onchange
    • onblur
    • oninput
    • onload
  14. Drag-and-drop in DHTML is achieved by:

    • Using HTML only
    • Combining events like onmousedown, onmousemove, onmouseup
    • Using CSS transitions
    • Using PHP backend
  15. Which DOM property gives access to all child elements?

    • childList
    • children
    • childNodes
    • getChildren()