Past-MidTerm Paper
Past-MidTerm Paper
Q7. What will be the output of the following HTML code fragment.
<a href="#">MyLink</a>
a) ‘MyLink’ is displayed as a hyperlink, when clicked brings up the ‘Page not Found’ message in the browser.
b) The text ‘MyLink’ is displayed as a hyperlink.
c) The text ‘MyLink’ is displayed as normal text (not as a hyperlink).
d) The text ‘<a href="#">MyLink</a>’ is displayed as it is.
e) Nothing is displayed as a result of this code fragment.
Q8. To create an internal CSS file embedded inside html, which of the following tag?
a) <style> b) <script> c) <link> d) <head> e)<meta>
Q9. In CSS, how to use select an div tag that has class name “heading”
a) div.heading {} b) heading.div { } c) heading { }
d) div:heading {} e) #heading { }
Q10. What is the correct HTML for referring to an external style sheet?
b) <style src=”mystyle.css” rel="text/css" type="stylesheet">
c) <link href="style.css" type="text/css" rel="stylesheet">
d) <style href="style.css" type="text/css" rel="stylesheet">
e) <link src="style.css" rel="text/css" type="stylesheet">
Q11. Where in an HTML document is the correct place to refer to an external style sheet?
a) In <head> tag b) In <body> tag c) In <style> tag d) In <script> tag
Q12. To change background color of a <div> tag, whick CSS style would be used
a) background.div{ background-color:RED} b) div:background{ background-color:RED}
c) div{ background-color:RED} d) div{ color-bk:RED}
Q17. What is the colour of text in a paragraph of an HTML document that uses the above style sheet?
P {color: blue; background-color: white; border-color: red; border-left: solid}
BODY {color: black; border-color: green}
a) blue b) white c) red d) black e) green
Q18. Which CSS property is used to add spaces before the content data
a) Margin b) Padding c) Float d) Border e) DIV
Q19. The space between the content border and the data is set using ___
a) Margin b) Padding c) Float d) Border e) DIV
Q20. To remove underline from a hyperlink text, which property/properties can be used in a Cascading Style Sheet?
a) text-line b) text-decoration c) font-style d) font e) <u>
For each question below select the appropriate answer from the list given on the right (5 Marks)
Q26: Write a HTML code displaying a text “Hello BSIT Student” in the center of the page with Blue in
color (2.5 marks)
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________
____________________________________________________________________________________________________