Web-I-Question-Bank
Web-I-Question-Bank
Q2. What’s difference between DIV and SPAN elements (Give a simple example).
Q3. Order the CSS rules below from highest to lowest priority using numbers (1 to 5).
( ) In the settings defined by a user for a particular browser installation.
( ) In a style element in the web page’s head section.
( ) In an element’s style attribute.
( ) In the browser’s native default settings.
( ) In an external file.
Q7. What’s difference between outerHTML and innerHTML of document object (Give an example).
Q8. Write CSS rule for images below to set background image (Assume name of image is
background.jpg).
Q10. What’s difference between ul and ol elements (Give a simple example for each).
Q11. Fill in the blanks in each of the following.
a) HSL stands for ___________________________________________________________.
b) ______________________________________ is the CSS property-value pair that specifies the
boldness of the text characters.
c) The ___________ element is for a superscript. The ___________ element is for a subscript.
d) CSS selectors are _______________, ________________, ________________,
_________________.
Tishk International University
Computer Engineering Department
Web Programming I
Question Bank
Q12. Write complete HTML and CSS code that generates output below (car1.jpg, car2.jpg, car3.jpg).
Q14. Write CSS style rules that make each of the elements described below to red (color: red;). Write the
selector rules as efficiently as possible.
a. All the elements in the body
________________________________
b. h2 elements
________________________________
c. h1 elements and all paragraphs
________________________________
d. Elements belonging to the class special
________________________________
e. All elements in the “intro” section
________________________________
Tishk International University
Computer Engineering Department
Web Programming I
Question Bank
Q16. Write a complete HTML and CSS code that generates the following output.
Q19. What’s difference between descendant selector and child selector (Give a simple example for each).
Q20. In general, what is the relationship between section and article?
Tishk International University
Computer Engineering Department
Web Programming I
Question Bank
Q21. Write CSS style rules that make each of the elements described below to red (color: black;). Write
the selector rules as efficiently as possible.
a. All the elements in the body
________________________________
b. strong elements in the “main” section
________________________________
c. h2 elements and all paragraphs
________________________________
d. Elements belonging to the class special
________________________________
e. All elements in the “intro” section
________________________________
f. strong elements in the “special” section
________________________________
Q22. Write a complete HTML and CSS code that generates the following output.
NOTE: Check also the lab tasks and exercises of the textbook.