Docsity

Web Development Quiz: HTML, CSS, and JavaScript Questions, Exams of Artificial Intelligence

Toggle sidebar
bg1
What |is |a |characteristic |of |a |web |page |with |responsive |design?
A) |The |ability |to |react |to |user |events
B) |A |measure |of |the |page |load |speed
C) |The |ability |to |resize |to |the |screen |size
D) |A |measure |of |the |page |close |speed |- | |correct |answers |The |ability |to |resize |to |the |screen
|size
Which |language |provides |dynamic |content |for |a |web |page |across |all |browsers?
A) |XML
B) |JavaScript
C) |HTML5
D) |XHTML |- | |correct |answers |JavaScript
Which |type |of |content |should |use |an |<aside>?
A) |News |feeds
B) |Site |copyrights
C) |Headlines
D) |Navigation |menus |- | |correct |answers |News |feeds
Which |element |should |a |developer |use |for |a |bulleted |list? |
A) |<ul>
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Web Development Quiz: HTML, CSS, and JavaScript Questions and more Exams Artificial Intelligence in PDF only on Docsity!

What |is |a |characteristic |of |a |web |page |with |responsive |design? A) |The |ability |to |react |to |user |events B) |A |measure |of |the |page |load |speed C) |The |ability |to |resize |to |the |screen |size D) |A |measure |of |the |page |close |speed |- | |correct |answers |The |ability |to |resize |to |the |screen |size Which |language |provides |dynamic |content |for |a |web |page |across |all |browsers? A) |XML B) |JavaScript C) |HTML D) |XHTML |- | |correct |answers |JavaScript Which |type |of |content |should |use |an |? A) |News |feeds B) |Site |copyrights C) |Headlines D) |Navigation |menus |- | |correct |answers |News |feeds Which |element |should |a |developer |use |for |a |bulleted |list? | A) |

B) | C) | D) |

|- | |correct |answers |

What |does |an |HTML5 |code |validator |confirm |about |code? A) |It |contains |no |warnings. B) |It |works |in |every |browser. C) |It |complies |with |a |standard. D) |It |follows |best |practices. |- | |correct |answers |It |complies |with |a |standard. A |web |developer |needs |to |play |an |audio |file |endlessly. |The |developer |writes |the |following |HTML |code:

|

Which |attribute |should |this |developer |use? A) |controls B) |autoplay C) |loop D) |src |- | |correct |answers |loop Which |attribute |is |used |to |display |an |image |inside |a | |element |before |the |video |starts |playing? A) |src B) |img C) |type D) |poster |- | |correct |answers |poster

What |should |be |added |first |when |embedding |CSS |in |a |single |web |page |as |an |internal |style |sheet? A) |A | |block D) |Declarations |within |a | | |block |- | |correct |answers |A | D) |float:left; |- | |correct |answers |padding-left:2px; A |web |designer |reviews |the |following |CSS3 |code: #brand |{ |font-weight: |bold; } Which |paragraph |element |will |it |select? A) |

Web |Design

B) |

Web |Design

C) |

Web |Design

D) |

Web |Design

|- | |correct |answers |

Web |Design

Which |CSS |selector |defines |an |element |with |a |class |attribute |equal |to |subject? A) |#subject B) |.subject C) |@subject D) |::subject |- | |correct |answers |.subject What |immediately |encloses |the |padding |in |the |CSS |box |model? A) |Content B) |Margin C) |Border D) |Table |- | |correct |answers |Border What |is |the |outermost |box |of |the |CSS |box |model? A) |Border

|margin: |7px; > |- | |correct |answers |.floatright |{ |float: |right; |margin: |7px; } Which |CSS |transition |should |be |used |on |an |image |to |make |it |ease |in |when |a |user's |mouse |hovers |over |that |image? A) |transition-property B) |transition-duration C) |transition-timing-function D) |transition-delay |- | |correct |answers |transition-timing-function Which |CSS |property |should |a |developer |use |to |specify |the |bottom |of |a |3D |element? A) |transform B) |perspective C) |transform-style D) |perspective-origin |- | |correct |answers |perspective-origin A |web |designer |creates |the |following |animation |by |using |CSS3: #texteffect |{ |position: |relative; |animation-name: |scroll; |animation-duration: |5s; |animation-timing-function: |linear; | |animation-play-state: |running;

@keyframes |scroll |{ |from |{left: |0px;} |to |{left: |200px;} } How |does |the |content |of |the |element |move |when |the |page |loads? A) |From |left |to |right |one |time B) |From |left |to |right, |repeating |for |as |long |as |the |page |displays C) |From |top |to |bottom |one |time D) |From |top |to |bottom, |repeating |for |as |long |as |the |page |displays |- | |correct |answers |From |left |to |right |one |time A |web |page |includes |the |following |CSS |code: @keyframes |anim_01 |{ 0% |{left: |0px; |top: |0px;} 50% |{left: |200px; |top: |0px;} 100% |{left: |600px; |top: |0px;} } #animation |{ |position:relative; |animation-name: |anim_01; |animation-duration: |4s; |animation-timing-function: |linear; |animation-iteration-count: |infinite; |animation-direction: |alternate; |animation-play-state: |running;

|margin-left: |auto; |margin-right: |auto; |-webkit-transition: |background-color |2s |ease-out; |-moz-transition: |background-color |2s |ease-out; |-o-transition: |background-color |2s |ease-out; |transition: |background-color |2s |ease-out; } .box:hover |{ |background-color: |green; |cursor: |pointer; } Which |color |does |this |box |turn |when |a |user |hovers |a |mouse |pointer |over |it? A) |Green |with |a |time |delay |of |two |seconds B) |Red |with |a |time |delay |of |two |seconds C) |Green |with |a |time |duration |of |two |seconds D) |Red |with |a |time |duration |of |two |seconds |- | |correct |answers |Green |with |a |time |duration |of |two |seconds A |web |page |has |a |section |that |contains |an | |element. |The |element |is |always | 10 |pixels |from |the |right |and | 50 |pixels |from |the |top |of |the |browser. |Which |type |of |layout |positioning |does |the | |element |use? A) |Static B) |Relative C) |Absolute D) |Fixed |- | |correct |answers |Fixed

Which |background-size |property |value |scales |the |background |image |to |the |greatest |height |and |width |that |fits |within |the |specified |content |area? A) |cover B) |contain C) |percentage D) |length |- | |correct |answers |contain The |background-origin |property |has |a |value |named |padding-box. |Which |corner |of |the |padding |edge |does |the |padding-box |value |set |the |background |relative |to? A) |Upper |left B) |Upper |right C) |Lower |left D) |Lower |right |- | |correct |answers |Upper |left Which |tag |enables |developers |to |include |dynamic |code |in |an |HTML |document? A) |mark B) |script C) |main D) |section |- | |correct |answers |script Why |is |JavaScript |considered |a |scripting |language? A) |The |code |must |be |compiled. B) |It |is |driven |by |events. C) |It |is |object-oriented. D) |The |code |must |be |interpreted. |- | |correct |answers |The |code |must |be |interpreted. Which |option |declares |a |variable |called |name |and |assigns |the |literal |value |Student |to |it?

B) |reset C) |unload D) |abort |- | |correct |answers |change Which |JavaScript |event |handler |is |associated |with |the |form |object? A) |onclick B) |onchange C) |onselect D) |onreset |- | |correct |answers |onreset What |are |variables |that |are |passed |to |a |function |called? A) |Arguments B) |Statements C) |Keywords D) |Prompts |- | |correct |answers |Arguments What |must |follow |the |name |of |a |function |in |a |JavaScript |function |declaration? A) |Script |block B) |Curly |braces C) |Calling |statement D) |Parenthesis |- | |correct |answers |Parenthesis Which |method |should |a |developer |use |to |create |a |message |and |request |user |input |in |a |text |field? A) |confirm B) |prompt

C) |alert D) |write |- | |correct |answers |prompt Given |the |following |JavaScript: var |name |= |"student"; Which |code |statement |modifies |the |name |variable |so |that |all |characters |are |uppercase? | A) |name |= |name.toUpperCase; B) |name.toUpperCase(); C) |name |= |name.toUpperCase(); D) |name.toUpperCase; |- | |correct |answers |name |= |name.toUpperCase(); Which |variable |name |format |does |JavaScript |use? A) |#address B) |1stAddress C) |.address D) |_address |- | |correct |answers |_address Which |data |type |contains |properties |and |methods? | A) |Object B) |Null C) |Function D) |String |- | |correct |answers |Object Which |document |object |model |(DOM) |method |does |the |Canvas |element |use? A) |beginPath() B) |getContext()

ctx.fillStyle |= |"red"; ctx.arc(75, |75, |50, |0, |Math.PI |* |2, |true); | ctx.fill(); ctx.moveTo(0, |0); ctx.lineTo(100, |100); Which |Canvas |application |programming |interface |(API) |method |should |a |developer |use |to |add |the |line |to |the |drawn |path |on |a |canvas? A) |closePath() B) |stroke() C) |fill() D) |beginPath() |- | |correct |answers |stroke() Which |method |of |the |Geolocation |application |programming |interface |(API) |should |a |developer |use |to |get |periodic |updates |of |a |user's |coordinates? A) |getCurrentLocation() B) |watchPosition() C) |clearWatch() D) |toString() |- | |correct |answers |watchPosition() Given |the |following |markup: script function |dragOver(event) |{ } function |drag(event) |{ |event.dataTransfer.setData("id", |event.target.id); } function |drop(event) |{

|var |id |= |event.dataTransfer.getData("id"); |event.target.appendChild(document.getElementById(id)); } /script

Which |statement |should |a |developer |add |to |the |dragOver |function |to |allow |the |image |to |be |dragged |and |dropped |onto |the |section |element? A) |event.type |= |"acknowledge"; B) |event.cancelBubble |= |true; C) |event.stopPropagation(); D) |event.preventDefault(); |- | |correct |answers |event.preventDefault(); Which |line |of |code |should |a |developer |use |to |create |an |interface |that |can |retrieve |data |in |a |client |browser? A) |new |XMLHttpRequest(); B) |new |{ |"AjaxObject":"xml" |} C) |script |src |= |"ajax" |/ |script D) |script |src |= |"jquery-1.8.21.min.js" |/ |script |- | |correct |answers |new |XMLHttpRequest(); Given |the |following |HTML |code:

|One |Two

Which |jQuery |code |segment |inserts |an |item |at |the |beginning |of |the |list? A) |$("ul |> |li").append("Zero");

D) | |- | |correct |answers | Which |attribute |value |presents |form |data |to |a |server |for |processing? A) |submit B) |reset C) |button D) |url |- | |correct |answers |submit Which |global |attribute |should |a |developer |use |to |bind |a |label |element |to |an |input |element? A) |form B) |name C) |placeholder D) |for |- | |correct |answers |for Given |the |following |HTML: What |color |would |you |like |to |use?

What |happens |when |the |page |loads? A) |The |select |element |in |the |form |takes |focus. B) |The |red |option |is |selected. C) |The |blue |option |is |selected.

D) |The |autofocus |attribute |in |the |form |takes |focus. |- | |correct |answers |The |select |element |in |the |form |takes |focus. Which |code |segment |creates |input |text |that |has |its |value |checked |against |a |regular |expression? A) | B) | C) | D) | |- | |correct |answers | What |is |a |limitation |of |user |input |validation? A) |Validation |detects |only |invalid |content |and |misleading |information. B) |Validation |detects |only |incorrect |formatting |and |missing |information. C) |Users |have |difficulties |filling |out |the |form. D) |Users |make |errors |while |filling |out |the |form. |- | |correct |answers |Validation |detects |only |incorrect |formatting |and |missing |information. Given |the |following |markup:

What |does |the |markup |do? A) |It |generates |a |password |key |pair |between | 8 |and | 12 |characters |long. B) |It |calls |a |JavaScript |function |named |password |with |the |arguments | 8 |and |12. C) |It |allows |a |user |to |enter |a |password |between | 8 |and | 12 |characters |long. D) |It |executes |a |stored |procedure |named |password |with |the |arguments | 8 |and |12. |- | |correct |answers |It |allows |a |user |to |enter |a |password |between | 8 |and | 12 |characters |long.