Web Programming Assignment-2
Web Programming Assignment-2
Assignment II
UNIT 2
B.tech-CSE
Semester: II
Subject: Web Programming (BCO565A)
SECTION A (2 * 5 = 10 Marks)
01.What is the purpose of the CSS class attribute, and how is it used to style HTML
elements?
02.Explain the difference between id and class selectors in CSS. When would you use
each?
03.What is the purpose of the CSS float property, and how does it affect the layout of
elements?
04.What is the CSS z-index property used for?
05.What is the difference between padding and margin in the CSS box model?
SECTION B (7 * 3 = 21 Marks)
01.Explain the concept of "cascading" in CSS. How do different style rules (e.g., inline,
internal, external) interact and which rules take precedence?
02.Describe how to use CSS transitions to create simple animations. Explain the different
properties involved (e.g., transition-property, transition-duration,
transition-timing-function) and provide an example.
03.Explain how to use CSS filters to add visual effects to elements (e.g., blur, grayscale,
brightness). Give two examples and show the CSS code.
01.Explain the different ways to position elements using CSS (static, relative, absolute,
fixed). Provide examples of when you would use each positioning method and explain
how they affect the element's placement within the document flow.
JECRC UNIVERSITY
Assignment II
02.Discuss how to use JavaScript to manipulate the DOM. Explain how to select elements,
change their content, attributes, and styles. Provide a code example that demonstrates at
least three different DOM manipulation techniques.
03.Explain how to use JavaScript to respond to events in a web page. Describe the event
model and how event listeners are attached to elements. Provide an example where you
use JavaScript to handle a click event, changing the style of an element when it is clicked.