IT2353 –WEB TECHNOLOGY–Unit II–2 Marks with ans–Reg 2008

Anna University

DEPARTMENT OF INFORMATION TECHNOLOGY

IT2353 –WEB TECHNOLOGY

Regulation 2008

Two Marks with Answers

Unit 2


SUBJECT CODE : IT2353

SUBJECT NAME:WEB TECHNOLOGY

Year / Class : 111rd yr IT

Semester : 6th sem


UNIT - II

PART – A

Two Marks with Answers


1. Mention the advantages of java/java script

a. Use sending data continuously File storage

Massively parallel computing b.

Smart forms – includes various controls like text box, radio button, text c. area control etc.

d. Peer-to-Peer Interaction – used in various client/server model.

e. Games – Combine the ability to easily include networking in your programs with java’s powerful graphics and you have the recipe for truly awesome multiplayer games.

Chat – Used in various chat applications. f.

Whiteboards – Java programs are not limited to sending ext and data g. across the network.

h. A number of programmers have developed whiteboard software that allows users in diverse locations to draw on their computers


2. What are Style Sheets?

Style sheets are collections of style information that are applied to plain text. Style information includes font attributes such as type size, special effects (bold,italic,underline), color and alignment. Style sheets also provide broader formatting instructions by specifying values for quantities such as line spacing and left and right margins.


3. List down the ways of including style information in a document.

a. 1.Linked Styles -Style information is read from a separate file that is specified in the <LINK> tag

b. 2.Embedded Styles -Style information is defined in the document head using the <STYLE> and </STYLE> tags.

c. 3.Inline Styles -Style information is placed inside an HTML tag and applies to all content between that tag and it companion closing tag.


4. Define cascading.

Cascading refers to a certain set of rules that browsers use, in cascading order, to determine how to use the style information. Such a set of rules is useful in the event of conflicting style information because the rules would give the browser a way to determine which style is given precedence.


5. What are the style precedence rules when using multiple approaches?

Inline styles override both linked style sheets and style information stored in the document head with <STYLE> tag.

Styles defined in the document head override linked style sheets.

Linked style sheets override browser defaults.


6. Give the syntax to specify a characteristic in linked style sheet.

{Characteristic: value}

Multiple characteristic/value pairs should be separated by semicolons.


7. List down font characteristics permitted in style sheets.

i. 1.font-family

ii. 2.font-size

iii. 3.font-weight

iv. 4.font-style

v. 5.font-variant


8. Write a note on content positioning characteristic \"Visibility\".

Enables the document author to selectively display or conceal positioned content; Possible values are show or hide.


9. Define scriptlets.

Scriptlets enable you to create small, reusable web applications that can be used in any web page. Scriptlets are created using HTML, scripting and Dynamic HTML. To include them in an HTML document use the <OBJECT> tag.


10. What does DHTML refer?

DHTML refers to collection of technologies, which makes HTML documents more dynamic and interactive.


11. What does data binding mean?

Data binding is DHTML feature that lets you easily bind individual elements in your document to data from another source such as database or comma delimited text file.


12. What is meant by Plug-in?

A hardware or software module that adds a specific feature or service to a larger system. The idea is that the new component simply plugs in to the existing system. For example, there are number of plug-ins for the Netscape Navigator browser that enable it todisplay different types of audio or video messages. Navigator plug-ins are based on MIME filetypes.


13. MENTION THE TYPES OF SCRIPTING LANGUAGES

• JavaScript is a Scripting language (web site development environment) created by Netscape.

• Hence JavaScript works best with the Netscape suite of Client and Server products.

• JavaScript is the native scripting language of Netscape Navigator.

• VBScript is the native Scripting language of HTML.


14. SERVER SIDE SCRIPTING

• In Server side scripting the script program is executed at Server Side the required html program is sent to the client.

• The job of the server is more in server side scripting


15. CLIENT SIDE SCRIPTING

• Here the script program is processed and executed in the client side itself.

• So that it reduces the burden of the server.


16. LIST THE ADVANTAGES OF JAVA SCRIPT

JavaScript is an object-oriented language that allows creation of interactive Web pages

JavaScript allows user entries, which are loaded into an HTML form to be processed as required


17. ADVANTAGES

a. It is an interpreted language, which requires no compilation steps.

b. Embedded within HTML.

c. Minimal Syntax – easy to learn

d. Quick Development

e. Designed for simple, small programs

f. High performance

g. Procedural Capabilities – support facilities such as condition checking, looping and

h. branching.

i. Designed for programming user events – like VB Java Script is also based on Events.

j. Easy Debugging and Testing

k. Platform Independence/ Architecture Neutral

l. SYNTAX OF JAVASCRIPT PROGRAM

m. <HTML>

n. <HEAD>

o. <SCRIPT language = “JavaScript”>

p. … body of the script program

q. </SCRIPT>

r. </HEAD>

s. <BODY>

t. <SCRIPT language = “JavaScript”>

u. body of the program.

v. </SCRIPT>

w. </BODY>

x. </HTML>


18. WHAT IS DENSE ARRAYS?

• A dense array is an array that has been created with each of its elements being assigned a specific value.

• Dense arrays are used exactly in the same manner as other arrays.

• Dense arrays are declared and initialized at the same time.

Array Methods

Join() – returns all elements of the array joined together as a single string.

Reverse() – reverses the order of the elements in the array.


19. LIST COMPARISION OPERATORS & STRING OPERATORS IN JAVA

• = = equal (perform type conversion before testing for equality.

• = = = strictly equal (do not perform type conversion before testing for equality

STRING OPERATORS

Currently Java Script supports only one string concatenation (+) operator.

EXAMPLE

“ab” + “cd” produces “abcd”


20. LIST THE VARIOUS DIALOG BOXES IN JAVA SCRIPT

Dialog boxes are used to display small windows. This is also used to get input from user.

a. SYNTAX

b. alert(“message”);

c. alert(“Click here to continue”)

d. prompt(“Enter your name”, name)

e. Alert is only used to display some information

f. Prompt is used to display information along with some input value

g. Confirm dialog box, causes program execution to halt until user action takes place.

h. The user action can be either OK or CANCEL.

i. OK – returns true

j. CANCEL – returns false


21. MENTION THE VARIOUS JAVA SCRIPT OBJECT MODELS .

• Math Object

• String Object

• Date Object

• Boolean and Number Object

• Document Object

• Window Object


22. HOW SCRIPTING LANGUAGE IS DIFFERS FROM HTML.

• HTML is used for simple web page design

• HTML with FORM is used for both form design and Reading input values from user.

• Scripting Language is used for Validating the given input values weather it is correct or not, if the input value is incorrect, the user can pass an error message to the user.

• Using form concept various controls like Text box, Radio Button, Command Button, Text Area control and List box can be created.


23. DEFINE FUNCTION IN JAVA SCRIPT .

Function is a part of a program or in other words function is a module in java program which can be called or invoked any number of times from the main program.

Function can be called any number of times but it can accept any input values or parameters, however it can return only one output at a time.


24. DEFINE CSS – CASCADING STYLE SHEET

• DHTML is a new and emerging technology that has evolved to meet the increasing demand for eye-catching and mind-catching web sites.

• DHTML combines HTML with Cascading Style Sheets (CSS) and Scripting Languages. HTML specifies a web page’s elements like table, frame, paragraph, bulleted list, etc. CSS can be used to determine an element’s size, color, position and a number of other features.

• Scripting Languages (JavaScript and VBScript) can be used to manipulate the web page’s elements so that styles assigned to them can change in response to a user’s input.


25. DEFINE CASDING STYLE SHEETS (CSS )

• CSS are powerful mechanism for adding styles (e.g. Fonts, Colors, Spacing) to web documents.

• They enforce standards and uniformity throughout a web site and provide numerous attributes to create dynamic effects.

• The advantage of a style sheet includes the ability to make global changes to all documents from a single location. Style sheets are said to cascade when they combine to specify the appearance of a page.

The style assignment process is accomplished with the <STYLE>…</STYLE> tags.


26. MENTION THE TYPES OF STYLE SHEETS

i. 1 Embedded or Internal Style sheet

ii. 2 External or Linked Style sheet

iii. 3 Inline style sheet


27. LIST THE DIFFERENCE BETWEEN STYLE SHEETS

Slno ‘Embedded Linked Inline Style Sheet

Style program is

embedded with in the

HTML program itself.

Style program alone is stored in a separate file with an extension of

.css file.

Different from

Embedded and

Linked CSS

Explicit LINK statement

is not needed.

Explicit LINK REL statement is needed to connect with .CSS file

Not required

Styles can be used within

the program only, it can

not be called some other files.

Styles used in .CSS file can be

used in any HTML program

Styles created should

be used immediately

before creating

another new style.


28. LIST THE PROPERTIES OF STYLE TAG

<STYLE> tag properties are divided in to 6 categories. They are

• Font Attributes

• Color and Background attributes

• Text Attributes

• Border Attributes

• Margin Attributes and

• List Attributes.


29. HOW TO INTRODUCE STYLE IN HTML PROGRAM?

<HTML>

<HEAD>

<STYLE Type = “text/css”>

predefined tag name {attribute name1:attribute value1; attribute name2:attribute

value2; ……attribute name-n:attribute value-n}

<STYLE>

</HEAD>

<BODY>

write the body of program

</BODY> </HTML>


30. What are Style Sheets?

Style sheets are collections of style information that are applied to plain text. Style information includes font attributes such as type size, special effects (bold,italic,underline), color and alignment. Style sheets also provide broader formatting instructions by specifying values for quantities such as line spacing and left and right margins.


31. List down the ways of including style information in a document.

1.Linked Styles -Style information is read from a separate file that is specified in the

<LINK> tag

2.Embedded Styles -Style information is defined in the document head using the

<STYLE> and </STYLE> tags.

3.Inline Styles -Style information is placed inside an HTML tag and applies to all

content between that tag and it companion closing tag.


32. What are the style precedence rules when using multiple approaches?

Inline styles override both linked style sheets and style information stored in the document head with <STYLE> tag.


33. Give the syntax to specify a characteristic in linked style sheet.

{Characteristic: value}

Multiple characteristic/value pairs should be separated by semicolons.


34. List down font characteristics permitted in style sheets.

1.font-family

2.font-size

3.font-weight

4.font-style


35. Write a note on content positioning characteristic \"Visibility\".

Enables the document author to selectively display or conceal positioned content; Possible values are show or hide.


36. List out the differences between Java script & VB script.

37. What is the advantage of client side programming?

38. List out the various client side programming languages.

39. What is java script?

40. What are the uses of Java script?

41. What is the use of prompt and confirm commands.

42. What are the various browsers to be supported .

43. Write a java script program to print first 100 numbers .

44. Write a java script program to print Armstrong numbers between 1 to 500.

45. Draw the DOM model.


No comments:

Post a Comment