Quiz on CSS and PHP

Descrição

Computer Science Quiz sobre Quiz on CSS and PHP, criado por Jimit Thakkar em 22-10-2017.
Jimit Thakkar
Quiz por Jimit Thakkar, atualizado more than 1 year ago
Jimit Thakkar
Criado por Jimit Thakkar aproximadamente 7 anos atrás
110
1

Resumo de Recurso

Questão 1

Questão
In CSS the selector .par matches
Responda
  • 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

Questão 2

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

Questão 3

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

Questão 4

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

Questão 5

Questão
Which of the following is not a valid variable in PHP?
Responda
  • $name
  • $1name
  • $name1
  • jim
  • $_name1

Questão 6

Questão
In CSS the selector #p matches
Responda
  • 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

Questão 7

Questão
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; }
Responda
  • 100
  • 140
  • 130
  • 120
  • 150

Questão 8

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

Questão 9

Questão
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
Responda
  • 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 ;}

Questão 10

Questão
What is the order of priority (from highest to lowest) that styles are applied to an element?
Responda
  • 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

Questão 11

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

Questão 12

Questão
In CSS which property is used to control the background color?
Responda
  • bgcolor
  • background-color
  • color
  • colour
  • color-background

Questão 13

Questão
It is possible to define CSS in
Responda
  • 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

Questão 14

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

Questão 15

Questão
In CSS the selector p matches
Responda
  • 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

Questão 16

Questão
The background of a given HTML element can be manipulated with
Responda
  • you cannot change the background of an element
  • only background-image
  • only background-color
  • background-color, background-image

Questão 17

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

Questão 18

Questão
In CSS which property is used to control the horizontal alignment of text in an element?
Responda
  • center-align
  • alignment
  • align
  • text-align
  • center

Questão 19

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

Questão 20

Questão
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; }
Responda
  • 100
  • 0
  • 120
  • 105
  • 115

Questão 21

Questão
Which of the following is a valid CSS selector ?
Responda
  • p color: red
  • p color: red;
  • p { color: red; }
  • p { color red }
  • p.color { red; }

Questão 22

Questão
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?
Responda
  • p < silly { align: center; }
  • p.silly { align: center, }
  • p.silly { text-align: center; }
  • p
  • silly { text-align: center; }

Questão 23

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

Questão 24

Questão
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: }
Responda
  • 0
  • 5
  • 1
  • 4

Questão 25

Questão
Which of the following is the correct HTML to refer to an external style sheet style.css ?
Responda
  • <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">

Questão 26

Questão
In CSS which property is used to control the size of the text?
Responda
  • text-size
  • text-style
  • font-size
  • font
  • font-style

Questão 27

Questão
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
Responda
  • 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

Questão 28

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

Questão 29

Questão
$a = "10"; $b = "20"; $c = $a * $b;
Responda
  • string
  • boolean
  • integer
  • float
  • array

Questão 30

Questão
What does CSS stand for?
Responda
  • Cascading Style Sheets
  • Cascading Symbols and Symptoms
  • Computer Symbol Sheets
  • Computer Style Sheets
  • CSS does not stand for anything

Questão 31

Questão
$a = 10; $b = 5; print '$a*$b';
Responda
  • 50
  • $a*$b
  • 10*5
  • you will get an error

Questão 32

Questão
$a = 10; $b = 10; print "$a * $b";
Responda
  • $a * $b
  • you will get an error
  • 100
  • 10 * 10

Semelhante

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