Skip to main content

ads1

Class 12 Chapter 2 :- Cascading Style Sheets and Javascript

  Chapter 2 Cascading Style Sheets and Javascript



CSS Stand for Cascading Style Sheets . CSS allows you to specify styles for the visual elements of the website.

Syntax of CSS 

The syntax of CSS consists of special symbols known as rules.. A CSS rule has two main parts: a selector, and one or more declarations.

The general syntax of CSS is defined as:-

selector {property : value)


H1 { color: green } 

                        

Selector   Property     Value 


We can easily add CSS using KompoZer. To make sure that KompoZer uses CSS by default, click

 Edit > Preferences


Advantages of CSS


  • CSS allows us to set the format of the website without changing the underlying structure.
  • We can make changes to the website without the fear of accidently changing the data.
  • The CSS has less code compared to that in HTML. Thus the web pages will load faster.


Disadvantages of CSS

  • The CSS compatibility varies with different browsers. This means that some of the style sheet features are not supported by the browser and the style cannot be displayed as per the users design.

JAVA SCRIPT

JavaScript is a scripting language that allows us to add logical aspects to our web pages.

A scripting language is a simple, lightweight programming language that does not contain the advanced programming functionalities. 

It is used in web pages to improve the design and validate forms.It adds interactivity to HTML pages and is inserted directly into the HTML code.

The JavaScript code is inserted into an HTML page, using the <script>... </script> tag.


Choose the most appropriate option from those given below :-

(1) Which of the following allows specifying styles for the visual elements of the 

website ? 

(a) Cascading Style Sheets 

(b) Webpage

(c) Form

(d) Animation 

(2) Which of the following is known as special symbol in the syntax of CSS ? 

(a) Rules 

(b) Selector 

(c) Declaration 

(d) Input 

(3) Which of the following are two main parts of CSS rule ? 

(a) Selector, declaration 

(b) Select, declaration 

(c) Selector, declare 

(d) Selection, declaration 

(4) Which of the following is an HTML element on which style can be applied ? 

(a) declaration 

(b) selector 

(c) select 

(d) declare 

(5) Which of the following is the syntax of CSS ? 

(a) select {property : value} 

(b) selector {value : property} 

(c) selector {property : value} 

(d) selection {property : value} 

(6) Which of the following has developed JavaScript ? 

(a) Yahoo 

(b) Google 

(c) Wikipedia 

(d) Netscape 

(7) Which of the following is a scripting language that allows adding programming to 

web pages ? 

(a) Action script 

(b) JavaScript 

(c) HTML 

(d) C$$ 

(8) Which of the following is a scripting language that is simple, lightweight programming 

language that does not contain advanced programming functionalities ? 

(a) JavaScript 

(b) HTML 

(c) C 

(d) Java 

(9) Which of the following tag is used to insert JavaScript code into an HTML page ? 

(a) <script>... <script> 

(b) <script>... </script> 

(c) <script>... <//script> 

(d) </script>... </script> 

(10) Which of the following symbol signifies the start and end of a JavaScript block ? 

(a) semicolon 

(b) square bracket 

(c) curly bracket 

(d) round bracket 

(11) Which of the following is a reusable block of code that performs a particular 

task ? 

(a) Array 

(b) Code 

(c) Program 

(d) Function 

(12) Which of the following statement is used to return a value in a function ? 

(a) retum 

(b) function 

(c) select 

(d) send 

(13) Which of the following is generated by the browser due to interaction between the user 

and the web page ? 

(a) Function 

(b) Response 

(c) Event 

(d) Value 

(14) Which of the following is not an event ? 

(a) Abort 

(b) Mouseover 

(c) Set 

(d) Load 

(15) Which of the following is a container for storing data ? 

(a) Variable 

(b) Integer 

(c) Event 

(d) Event handler 

(16) Which of the following stands for BOM ? 

(a) Browser Of Model 

(b) Browser Object Model 

(c) Browser Object Modelling 

(d) Browse Object Model 

(17) Which of the following is the top level object in the browser object model ? 

(a) Window 

(b) Document 

(c) Page 

(d) Location 

(18) Which of the following stands for NaN ? 

(a) Not a Numeric 

(b) Not a Number 

(c) Not a Noun 

(d) Not an Numeric 


Link to Download :- Chapter:- 2 Cascading Style Sheets and Javascript




Link to Download :- Chapter:- 2 Multiple choice question 








ads2

Popular posts from this blog

1. Given the school result data, analyses the performance of the students on #different parameters, e.g subject wise or class wise.

1. Given the school result data, analyses the performance of the students on #different parameters, e.g subject wise  or class wise. Solution :-   # x-axis is shows the subject and y -axis # shows the markers in each subject # import pandas and matplotlib  import pandas as pd  import matplotlib.pyplot as plt # Simple Line Chart with setting of Label of X and Y axis, # title for chart line and color of line  subject = ['Physic','Chemistry','Mathematics', 'Biology','Computer'] marks =[80,75,70,78,82] # To draw line in red colour plt.plot(subject,marks,'r',marker ='*')     # To Write Title of the Line Chart plt.title('Marks Scored') # To Put Label At Y Axis plt.xlabel('SUBJECT')           # To Put Label At X Axis plt.ylabel('MARKS')             plt.show() Output :- 

11. Write a Java program to input basic salary of an employee and calculate its Gross salary according to following:

    11. Write a Java program to input basic salary of an employee and calculate its Gross salary according to following: Basic Salary <= 10000 : HRA = 20%, DA = 80% Basic Salary <= 20000 : HRA = 25%, DA = 90% Basic Salary > 20000 : HRA = 30%, DA = 95% Static Solution :-  class salary {     public static void main(String args[])     {     double basic=20000.50,gross,da,hra;     if(basic <=10000)     {         da = basic * 0.8;         hra = basic *0.2;     }              else if(basic <=20000)     {         da = basic * 0.9;         hra = basic *0.25;     }     else     {         da = basic * 0.95;         hra = basic * 0.3;     }     gross = basic + da + hra;     System.out.println("The Gross Salary is :-"+gross);     } } Output :-  Dynamic Solution :-  class salary {     public static void main(String args[])     {     double basic=20000.50,gross,da,hra;     Scanner in = new Scanner(System.in);     System.out.println("Enter the Basic Salary

Class 10th Chapter 7 Functions in Calc

   Functions in Calc Calc provide built-in standard functions for mathematical, logical, statistical, date and time, financial and other calculations on numbers and text. The process of inserting a function is similar for all functions.That is, to use a function we need to enter a correct spelling of the function along with necessary arguments. This is known as syntax of the functions. t is possible to loose the grip on it and easy to introduce errors. To avoid this, you may take help of function wizard. The Calc support some more functions that support logical decision making. These functions are AND, OR, and NOT. (1) In which of the following ways we can enter a function in Calc ? (a) Directly typing function name in a cell nan (b) Function wizard or selecting from tool bar (c) A and B both (d) Depends on functions (2) A function can start with which of the following options ? (a) '='sign (b) Alphabets (c) Numbers (d) Any of these (3) Which of the following is not a logical