Bsc CSIT Semester 5 – Web Technology – Unit 3. Cascading Style Sheets
Comprehensive questions and detailed answers for Unit 3. Cascading Style Sheets. Perfect for exam preparation and concept clarity.
How positioning of HTML elements can be done using CSS? Create a HTML page with a div with some content and two paragraph with some contents having id p1 and p2. Write external CSS for the div tag having fixed position with border style solid and width 2px. the p1 should have relative position. The font type of p1 should be Arial and color should be red. The p2 have absolute position with top 0px and left 200px.
How external CSS is inserted in an HTML page? Create an HTML page with two paragraph tags With id pl and p2, and one div tag with id dv1. Write an external CSS file as per the description. the margin of the paragraphs should be 100px from the top and 80px from the left. Both of paragraphs should have the display set to block. The dv1 should have padding left and right set to 30px and 25px respectively, its background color should be blue and the font color should be red with the font type Verdana. Set the display of dv1 to none.
Describe CSS Box model with example.
How positioning of HTML elements can be done using CSS? Create a HTML page with a div with some content and two paragraph with some contents having id p1 and p2. Write external CSS for the div tag having fixed position with border style solid and width 2px. the p1 should have relative position. The font type of p1 should be Arial and color should be red. The p2 have absolute position with top 0px and left 200px.
How web pages can be made responsive using media queries ? Illustrate with an example.
How can you define position property for specifying specific positioning of an HTML element? Write internal CSS to illustrate position of an HTML div.
What are the usages of class and id selectors in CSS? Illustrate with example.
What is word-wrap property in CSS? Write an HTML script to illustrate the word-wrap property.
How internal and external CSS differ from each other. Illustrate with example.
What is text-overflow property in CSS ? How can you use clip and ellipseis in text-overflow ?
Define CSS. What is the use of CSS shadow effects? Write an HTML script with proper CSS as per the following description. Display a text content “CSIT Exam” in a div with id div1. The text should have a horizontal shadow of 3px and a vertical shadow of 2px. The shadow color should be green. Also set the horizontal and vertical shadow of the div to 10px respectively with the shadow color of div to blue.
Create an HTML page containing three paragraphs p1, p2 and p3 with some contents. Write internal CSS to set the position of p1 to relative, p2 to float and p3 to absolute.
Sample Questions
How external CSS is inserted in an HTML page? Create an HTML page with two paragraph tags With id pl and p2, and one div tag with id dv1. Write an external CSS file as per the description. the margin
Describe CSS Box model with example.
How positioning of HTML elements can be done using CSS? Create a HTML page with a div with some content and two paragraph with some contents having id p1 and p2. Write external CSS for the div tag hav
How web pages can be made responsive using media queries ? Illustrate with an example.
And more questions available on this page.