Quiz on CSS and PHP

Descripción

Computer Science Test sobre Quiz on CSS and PHP, creado por Jimit Thakkar el 22/10/2017.
Jimit Thakkar
Test por Jimit Thakkar, actualizado hace más de 1 año
Jimit Thakkar
Creado por Jimit Thakkar hace alrededor de 7 años
110
1

Resumen del Recurso

Pregunta 1

Pregunta
In CSS the selector .par matches
Respuesta
  • all <p> elements whose class is par
  • all <p> elements whose id is par
  • all <p> elements
  • all elements whose class is par
  • all elements whose id is par

Pregunta 2

Pregunta
In PHP what is the data type of the variable $c? $a = 10; $b = 1.238; $c = $a * $b;
Respuesta
  • string
  • array
  • float
  • integer
  • boolean

Pregunta 3

Pregunta
In CSS, which property would be used to allow an image to be positioned on the right?
Respuesta
  • overflow: hidden
  • float: right
  • clear: right
  • align: right

Pregunta 4

Pregunta
In CSS a rule has the syntax a { b : c ; }. In this rule the symbol a is known as a
Respuesta
  • comment
  • parameter
  • selector
  • value
  • property

Pregunta 5

Pregunta
Which of the following is not a valid variable in PHP?
Respuesta
  • $name
  • $1name
  • $name1
  • jim
  • $_name1

Pregunta 6

Pregunta
In CSS the selector #p matches
Respuesta
  • all <p> elements whose id is p
  • all elements whose id is p
  • all <p> elements
  • all <p> elements whose class is p
  • all elements whose class is p

Pregunta 7

Pregunta
Considering the CSS box model, what is the final width of an element of this class: .item { width: 100px; margin: 10px; padding-left: 10px; padding-right: 0px; }
Respuesta
  • 100
  • 140
  • 130
  • 120
  • 150

Pregunta 8

Pregunta
In CSS to apply color: red to h1 and h2 you could use the rule(s)
Respuesta
  • h1 { color : red; } h2 { color : blue; }
  • h1 { red : color; } h2 { red : color; }
  • h1:h2 { color : red; }
  • h1, h2 { color : red; }
  • h1.h2 { color : red; }

Pregunta 9

Pregunta
CSS enables links to be styled differently depending on what state they are in. To set the hover colour for a link to be white, one would code a CSS rule
Respuesta
  • a { color : white ; hover : true ;}
  • a { hover-color : white ;}
  • a:link { color : white ; }
  • d. a:hover { color : white ; }
  • e. a { color : white ; hover-dwell : true ;}

Pregunta 10

Pregunta
What is the order of priority (from highest to lowest) that styles are applied to an element?
Respuesta
  • default html style, embedded style, inline style, externally linked style
  • externally linked style, embedded style, inline style, default html style
  • embedded style, inline style, externally linked style, default html style
  • embedded style, externally linked style, inline style, default html style
  • inline style, embedded style, externally linked style, default html style style sheet, the browser default

Pregunta 11

Pregunta
In PHP, what will be the output of the following code $a = "hello "; $b = "world "; $c = 10; print $a . $c . $b ;
Respuesta
  • hello world
  • you will get an error
  • hello 10 world
  • hello
  • 10

Pregunta 12

Pregunta
In CSS which property is used to control the background color?
Respuesta
  • bgcolor
  • background-color
  • color
  • colour
  • color-background

Pregunta 13

Pregunta
It is possible to define CSS in
Respuesta
  • only in external style sheets
  • only inline
  • only in internal style sheets
  • external style sheets, internal style sheets, and inline
  • only in external style sheets and internal style sheets

Pregunta 14

Pregunta
In CSS, what is the range for the R, G, B when specifying a color using rgb(R, G, B) ?
Respuesta
  • 1-256
  • 0-255
  • 1-100
  • 0-1
  • 0xFFFFFF

Pregunta 15

Pregunta
In CSS the selector p matches
Respuesta
  • all elements whose class is p
  • all <p> elements whose class is p
  • all <p> elements whose id is p
  • all <p> elements
  • all elements whose id is p

Pregunta 16

Pregunta
The background of a given HTML element can be manipulated with
Respuesta
  • you cannot change the background of an element
  • only background-image
  • only background-color
  • background-color, background-image

Pregunta 17

Pregunta
In PHP, what is the output of the following code $a = 2 + 3 * 5 + 10; print $a;
Respuesta
  • 20
  • 25
  • 35
  • 27
  • 50

Pregunta 18

Pregunta
In CSS which property is used to control the horizontal alignment of text in an element?
Respuesta
  • center-align
  • alignment
  • align
  • text-align
  • center

Pregunta 19

Pregunta
In PHP what is the value of $a $s = "Hello World"; $a = $s[7];
Respuesta
  • 7
  • "W"
  • "o"
  • you will get an error
  • "Hello"

Pregunta 20

Pregunta
In CSS, considering the CSS Box Model, would be the final width of an element with the following id? #item { width: 100px; border: 5px; margin: 5px; padding: 0px; }
Respuesta
  • 100
  • 0
  • 120
  • 105
  • 115

Pregunta 21

Pregunta
Which of the following is a valid CSS selector ?
Respuesta
  • p color: red
  • p color: red;
  • p { color: red; }
  • p { color red }
  • p.color { red; }

Pregunta 22

Pregunta
if you wanted a CSS rule to have all paragraphs of class silly to be centered on the page, which CSS rule would you use?
Respuesta
  • p < silly { align: center; }
  • p.silly { align: center, }
  • p.silly { text-align: center; }
  • p
  • silly { text-align: center; }

Pregunta 23

Pregunta
In PHP what is the data type of the variable $c? $a = 10; $b = 1.238; $c = $a * $b;
Respuesta
  • array
  • integer
  • string
  • boolean
  • float

Pregunta 24

Pregunta
The following PHP code has an error. What line is this error on? 0: $a = 10 + 1; 1: $b = "10" 2: if ($a <> $b) 3: { 4: print "Not equal"; 5: } 6: else 7: { 8: $b++; 9: }
Respuesta
  • 0
  • 5
  • 1
  • 4

Pregunta 25

Pregunta
Which of the following is the correct HTML to refer to an external style sheet style.css ?
Respuesta
  • <css rel="stylesheet" type="text/css" href="style.css">
  • <style> style.css</style>
  • <css> style.css</css>
  • <style "style.css\">
  • <link rel="stylesheet" type="text/css" href="style.css">

Pregunta 26

Pregunta
In CSS which property is used to control the size of the text?
Respuesta
  • text-size
  • text-style
  • font-size
  • font
  • font-style

Pregunta 27

Pregunta
The difference between serif and sans-serif fonts is thatThe difference between serif and sans-serif fonts is thatThe difference between serif and sans-serif fonts is thatThe difference between serif and sans-serif fonts is thatv
Respuesta
  • serif fonts are monospaced while sans-serif have variable width
  • sans-serif fonts have small lines at the end of some characters while serif do not
  • serif fonts have small lines at the end of some characters while sans-serif do not
  • sans-serif fonts are monospaced while serif have variable width
  • sans-serif fonts can be used without paying a royalty, while a royalty must be paid for serif fonts

Pregunta 28

Pregunta
In PHP, what is the output of the following code: $a = 10; $b = "10"; if ($a == $b) { print "hello "; } print "world";
Respuesta
  • $a
  • hello world
  • $b
  • world
  • 10

Pregunta 29

Pregunta
$a = "10"; $b = "20"; $c = $a * $b;
Respuesta
  • string
  • boolean
  • integer
  • float
  • array

Pregunta 30

Pregunta
What does CSS stand for?
Respuesta
  • Cascading Style Sheets
  • Cascading Symbols and Symptoms
  • Computer Symbol Sheets
  • Computer Style Sheets
  • CSS does not stand for anything

Pregunta 31

Pregunta
$a = 10; $b = 5; print '$a*$b';
Respuesta
  • 50
  • $a*$b
  • 10*5
  • you will get an error

Pregunta 32

Pregunta
$a = 10; $b = 10; print "$a * $b";
Respuesta
  • $a * $b
  • you will get an error
  • 100
  • 10 * 10
Mostrar resumen completo Ocultar resumen completo

Similar

Computing Hardware - CPU and Memory
ollietablet123
SFDC App Builder 2
Parker Webb-Mitchell
Data Types
Jacob Sedore
Intake7 BIM L1
Stanley Chia
Software Processes
Nurul Aiman Abdu
Design Patterns
Erica Solum
CCNA Answers – CCNA Exam
Abdul Demir
Abstraction
Shannon Anderson-Rush
Spyware
Sam2
HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Data Analytics
anelvr