Trac NG Hiem
Trac NG Hiem
Question 1 of
40:
1
6.Choose the correct HTML element to define important text?
2
10. How can you open a link in a new tab/browser window?
12. Inline elements are normally displayed without starting a new line.
3
15. What is the correct HTML for making a checkbox?
16. What is the correct HTML for making a text input field?
4
20. What is the correct HTML for inserting a background image?
22. HTML comments start with <!-- and end with -->
23. Block elements are normally displayed without starting a new line.
25. Which HTML attribute specifies an alternate text for an image, if the
image cannot be displayed?
5
26. Which doctype is correct for HTML5?
28. In HTML, you can embed SVG elements directly into an HTML page.
29. What is the correct HTML element for playing video files?
30. What is the correct HTML element for playing audio files?
6
31. The HTML global attribute, "contenteditable" is used to:
35. In HTML, which attribute is used to specify that an input field must be
filled out?
7
36. Which input type defines a slider control?
8
40. Which HTML element is used to specify a header for a document or
section?
II. CSS
9
4.Which HTML tag is used to define an internal style sheet?
10
9.How do you add a background color for all <h1> elements?
10. Which CSS property is used to change the text color of an element?
12. What is the correct CSS syntax for making all the <p> elements bold?
11
13. How do you display hyperlinks without an underline?
14. How do you make each word in a text start with a capital letter?
12
The left border = 20
pixels The right border =
1pixel?
19. When using the padding property; are you allowed to use negative values?
20. How do you make a list that lists its items with squares?
13
22. How do you select elements with class name 'test'?
3. JavaScript
14
2.What is the correct JavaScript syntax to change the content of the
HTML element below?
4.What is the correct syntax for referring to an external script called "xxx.js"?
15
6.How do you write "Hello World" in an alert box?
10. How to write an IF statement for executing some code if "i" is NOT equal
to 5?
16
11. How does a WHILE loop start?
14. How to insert a comment that has more than one line?
17
15. What is the correct way to write a JavaScript array?
16. How do you round the number 7.25, to the nearest integer?
17. How do you find the number with the highest value of x and y?
18. What is the correct JavaScript syntax for opening a new window called
"w2" ?
18
19. JavaScript is the same as Java.
21. Which event occurs when the user clicks on an HTML element?
19
24. What will the following code return: Boolean(10 > 9)
4. PHP
7.How do you get information from a form that is submitted using the "get"
method?
8.When using the POST method, variables are displayed in the URL:
21
9.In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for
strings:
13. What is the correct way to open the file "time.txt" as readable?
22
14. PHP allows you to send emails directly from a script?
23
18. PHP can be run on Microsoft Windows IIS(Internet Information Server):
19. The die() and exit() functions do the exact same thing.
24
23. How do you create an array in PHP?
25. Which operator is used to check if two values are equal and of same data
type?
25
EXERCISE:
A.HTML
2.Which one of the following headers has the correct HTML syntax?
6.Fill in the missing code to complete the markup of the HTML hyperlink.
26
7.True or False. Empty elements must have a close tag.
10. Which of the following is a correct syntax for using an HTML attribute?
11. Add a "tooltip" to the paragraph below with the text "About W3Schools".
27
12. Set the size of the image to 250 pixels wide and 400 pixels tall.
Alternate text is useful when the image cannot be displayed, like when the
page is read by a screen reader.
15. Which of the following headers is the largest and most important header?
16. Use the correct HTML tag to add a heading with the text "London".
28
17. Add six headings to the document with the text "Hello".
Start with the most important heading (the largest) and end with the least
important heading (the smallest).
19. Use the correct HTML tag to add a paragraph with the text "Hello World!".
29
20. Clean up this document with proper end tags.
21. Add a horizontal rule between the heading and the paragraph.
23. Wrap this poem around HTML tags that will preserve all spaces and
linebreaks when the element is displayed.
30
24. What is a correct way to add a background color to an HTML document?
25. Use the correct HTML attribute, and CSS, to set the color of the paragraph
to "blue".
31
29. Use CSS to set the background color of the document to yellow.
32
30. Use CSS to center align the document.
31. Two of the following HTML elements makes the text bold, which two?
33
32. Add extra importance to the word "degradation" in the paragraph below.
35. Apply subscript formatting to the number "2" in the text below.
34
36. Add a line through (strikeout) the letters "blue" in the text below.
37. Which of the following is NOT a quotation element (in fact, not an
HTML element at all)?
38. Use an HTML element to add quotation marks around the letters "cool".
35
Make the text below go right-to-left.
42. Use the HTML comment tag to make a comment out of the "This is a
comment" text.
44. Do you remember any legal HTML color names? Which one of the
following is a legal HTML color?
45. Insert the correct property to make the text color violet.
36
46. The Alpha channel of a color controls the color-transparency, but
which of the following values will be MOST transparent?
48. Insert the correct RGB color values to make the background color
completely blue.
49. Insert the a background color where green has the value 100, red has
the value 106, and blue has the value 205.
51. Insert the correct HEX value to make the text color white.
37
53. Which one of the following color values will reult in a black color?
54. Insert the HSLA value to make a color with no hue, 100% saturation,
50% lightness, and 50% transparency.
Use CSS to set the background color of the document (body) to yellow.
38
58. Use CSS to set the font of the document to "courier".
59. Use CSS to set the text color of the document to red.
39
60. Use CSS to make a yellow, 1 pixel thick, border around all paragraphs.
62. Use the correct HTML to make the text below into a link to "default.html".
40
63. Use the correct HTML attribute to make the link open in a new window.
64. Use the correct HTML to make the image become a link to "default.html".
68. What is a correct syntax for making a link red when you mouse over it?
41
69. What HTML attribute is used to create a bookmark?
70. Add a link to a bookmark, on the same page, with the id="mytext".
73. Use the HTML image attributes to set the size of the image to 250
pixels wide and 400 pixels tall.
74. Use CSS to set the size of the image to 250 pixels wide and 400 pixels
tall.
75. Use the correct HTML to make the image become a link to "default.html".
42
76. Make the image below float to the right of the paragraph.
77. Add the correct HTML attribute to display the "smiley.gif" image.
Alternate text is useful when the image cannot be displayed, like when the
page is read by a screen reader.
80. What is another HTML element used when defining image maps?
81. For image maps, specify a legal value for the area tag's
85. One of these elements is NOT a legal HTML element, which one?
90. True or False. Favicons must have the .ico file extension.
45
93. True or False. A page should only have one title element.
96. Add a table row at the end of the table, with two table cells.
The two table cells should have the value "Eve Jackson" and "94".
97. What is the correct CSS property for styling the border of a table?
46
98 What is the correct CSS code to
turn this table:
99. Use the correct CSS border values to create a solid black 3 pixels
border on a table element.
100. What is the correct CSS property for styling the width of a table?
101. True or False. To specify a table width, you are only allowed to use
percentages as a value.
102. Use CSS styles to make the table 300 pixels wide.
47
103. What is the correct tag name for a table-header in HTML?
The two table headers should have the value "Name" and "Age".
48
106. What is the correct CSS property for styling the padding inside table
cells?
107. What is the correct CSS property for styling the space between the table
cells?
108. Use the correct CSS property to add 15 pixels of space between the
cell border and cell content.
49
109. What is the correct HTML attribute for specifying how many rows a cell
should span?
110. Use the correct HTML attribute to make the second TH element span two
rows.
111. Use the correct HTML attribute to make the first TH element span two
columns.
50
112. What is the correct tag name for list items?
114. True or False. The list items in ordered lists will be marked with small
black circles by default.
115. What is the correct CSS property to use when defining the style of a
list marker of unordered lists?
116. Add a list item with the text "Coffee" inside the <ul>.
51
118. Use CSS to display squares instead of bullets.
119. What is the correct HTML attribute to use when defining the type of the
list item marker of ordered lists?
121. Use the correct HTML attribute to display letters (uppercase ABC) instead
of numbers.
52
122. What is the correct tag name for a description list?
123. Use the correct HTML elements to make a description of each term in
the description list.
124. What is the correct tag name for describing the term of a definition list?
53
128
129. True or False. You cannot align DIV elements side by side
130. One of the following statements is true about the DIV element, which one?
54
133. Add the correct class to make the H1 element red.
134. Add two classes to the H1 element, to make the background pink and the
color red.
55
136. Add the correct HTML attribute to make the H1 element red.
138. In the form below, add an input field with the type "button" and the value
"OK".
139. In the form below, add two radio buttons, both with the name
"fav_language".
140. What is the correct syntax for opening the form's result in a new browser
tab?
56
141. Add a submit button, and specify that the form should go to
"/action_page.php".
57
142. Specify that the form is submitted using the "POST" method.
143. What is the correct HTML element to group related data in a form and
also, by default, draw a border around it?
144. In the form below, add an empty drop down list with the name "cars".
drop down list. The first option must have the value "Volvo"
58
146. In the form below, add a text area with the name "note".
59