25
5/25/2018 HTMLVivaWin-slidepdf.com http://slidepdf.com/reader/full/html-viva-win 1/25 Html 1. Who is making the Web standards? a) The World Wide Web Consortium  b) Mozilla c) Microsoft d) Distributed Management Task Force Inc. Answer: a 2. What is the correct HTML for creating a hyperlink? a) <a url="http://www.w3schools.com">W3Schools.com</a>  b) <a href="http://www.w3schools.com">W3Schools</a> c) <a name="http://www.w3schools.com">W3Schools.com</a> d) <a>http://www.w3schools.com</a> Answer: b 3. How can you create an e-mail link? a) <a href="mailto:xxx@yyy">  b) <mail href="xxx@yyy"> c) <a href="xxx@yyy"> d) <mail>xxx@yyy</mail> Answer: b 5. How can you open a link in a new browser window? a) <a href="url" target="_blank">  b) <a href="url" target="new"> c) <a href="url" new> d) <a href=”url” new window> Answer: a 6. What is the correct HTML for making a drop-down list? a) <dl>  b) <list> c) <ul>

HTML Viva Win

Embed Size (px)

DESCRIPTION

Viva question bank

Citation preview

Html

1.Who is making the Web standards?

a)The World Wide Web Consortiumb)Mozillac)Microsoftd)Distributed Management Task Force Inc.Answer:a

2. What is the correct HTML for creating a hyperlink?a)W3Schools.comb)W3Schoolsc)W3Schools.comd)http://www.w3schools.comAnswer: b

3. How can you create an e-mail link?a)b)c)d)xxx@yyyAnswer:b

5. How can you open a link in a new browser window?a)b)c)d)Answer:a

6. What is the correct HTML for making a drop-down list?a)b)c)

  • d)
  1. Answer: c

    7. What is the correct HTML for inserting an image?a)b)image.gifc)d)

    Correct Answer: d

    9. What is the correct HTML for inserting a background image?a)b)c)d)Answer: c

    9. Which of these tags are all tags?a)b)c)d)Answer:b

    10. Hypertext Transfer Protocol Secure (HTTPS) is a combination of________________________Protocolwith _______________ protocol.

    Answer: Hypertext Transfer Protocol (HTTP) with SSL/TLS protocol.

    11. Which statement is true for session tracking.a)URL Rewriting.b) Hidden from fields.c) Cookies.d) Using Secure Sockets Layer.e)All of the above.Answer: e

    JavaScript

    1._____ JavaScript statements embedded in an HTML page can respond to user eventssuch as mouse-clicks, form input, and page navigation.A.Client-sideB.Server-sideC.LocalD.NativeAnswer: A

    2.Which of the following can't be done with client-side JavaScript?A.Validating a formB.Sending a form's contents by emailC.Storing the form's contents to a database file on the serverD.None of the aboveAnswer: C

    3.Which is the correct way to write a JavaScript array?A.var txt = new Array(1:"tim",2:"kim",3:"jim")B.var txt = new Array:1=("tim")2=("kim")3=("jim")C.var txt = new Array("tim","kim","jim")D.var txt = new Array="tim","kim","jim"

    Answer: C

    4.Which of the following is not considered a JavaScript operator?Correct Answer: BA.newB.thisC.deleteD.typeofAnswer:b

    5. Actions that can be detected by javascript are called ?a)HTMLb)Eventsc)ArrayAnswer: b

    6.How to create a Date object in JavaScript?A.dateObjectName = new Date([parameters])B.dateObjectName.new Date([parameters])C.dateObjectName := new Date([parameters])D.dateObjectName Date([parameters])Answer: A

    7.To set up the window to capture all Click events, we use which of the following statement?

    A.window.captureEvents(Event.CLICK);B.window.handleEvents (Event.CLICK);C.window.routeEvents(Event.CLICK );D.window.raiseEvents(Event.CLICK );Answer: A;

    8. _______ class provides an interface for invoking JavaScript methods and examining JavaScriptproperties.Answer: JSObject

    9.To open a dialog box each time an error occurs, which of the following is added to prefs.js?A.user_pref("javascript.classic.error_alerts", true);B.user_pref("javascript.classic.error_alerts ", false);C.user_pref("javascript.console.open_on_error ", true);D.user_pref("javascript.console.open_on_error ", false);

    Answer: A

    10.The syntax of capture events method for document object is ______________Answer: CA.captureEvents()B.captureEvents(args eventType)C.captureEvents(eventType)D.captureEvents(eventVal)Correct Answer: C / captureEvents(eventType)

    CSS

    1. What is the correct HTML for referring to an external style sheet?a)mystyle.cssb)c)Answer: b

    Correct Answr: b /

    2. Which HTML tag is used to define an internal style sheet?a)b)c)Answer: a

    3. Which is the correct CSS syntax?

    a){body:color=black(body}b)body {color: black}c){body;color:black}d)body:color=black

    Answer: b

    XML

    1. Which statement is NOTTrue.a)XML stands for EXtensible Markup Languageb)XML was designed to carry data, not to display datac)XML was designed to display data, not to carry data.d)XML tags are not predefined. You must define your own tags.e)None of the above.Answer: c

    2. Which statement is NOT True.a)All XML Elements must have a closing tag.b)XML tags are case sensitive.c)XML elements must be properly nested.d)Xml documents have a root element.e)None ofthe above.Answer: e

    3. What does XML stand for?

    a)eXtra Modern Linkb)eXtensible Markup Languagec)X-Markup Languaged)Example Markup Language

    Answer: b

    4. There is a way of describing XML data, how?

    a)XML uses a description node to describe datab)XML uses a DTD to describe the datac)XML uses XSL to describe dataAnswer: a

    5. What is the correct syntax of the declaration which defines the XML version?

    a)b)c)Answer: a

    6. What does DTD stand for?

    a)Document Type Definitionb)Dynamic Type Definitionc)Direct Type Definitiond)Do The Dance

    Answer: a

    7. What does XSL stand for?

    a)eXtensible Style Listingb)eXtra Style Languagec)eXpandable Style Languaged)eXtensible Stylesheet Language

    Answer: d

    8. What is a correct way of referring to a stylesheet called "mystyle.xsl" ?

    a)b)c)Answer: a

    9. For the XML parser to ignore a certain section of your XML document, which syntax is correct?

    a) Text to be ignored b) Text to be ignored c)d)Answer: c

    Servlets

    1) Which statement is true?a) Both Generic Servlet and HttpServlet implements Serializable Interface.b) Both these classes are abstract.c) GenericServlet defines a generic,protoco-independent servlet.d) All statements are true.Answer: d

    2) For getting locale-specific object, it needs to load_____________ class.Answer:ResourceBundle

    3) For a web application development strcture, in which directory contains web.xml file in webapplication development strcture.a) classesb) libc) webappsd) web-infAnswer: d

    4) For a web application development structure, in which directory contains servlet class files.a) classesb) libc) webappsd) servlet.Answer: a

    5) Which attribute or xml tag is not valid in web.xmla) init-servletb) servlet-mappingc) url-patternd) servlet-nameAnswer: a

    6) JSTL stands for1) Java Server Transcation Language2) JSP Standard Tag Library3) Java Server Tag Library4) None of the above.Answer: 2

    7) A java framework that allows us to access database through java programis called ____________Answer: jdbc

    8) Which Package contains the JDBC API?a) java.jdbc.*b) javax.jdbc.*;c) java.sql.*;d) javax.sql.*;Answer:c

    9) We send and receive HTML files files using which protocol?a) SMTPb) POP3c)HTTPd) FTPAnswer: c

    10) Which driver is called Pure Java Driver?a) 1b) 2c) 3d) 4Answer: d

    11) In Tomcat Server,____________ jar file is required to compile servlets.Answer: servlet-api.jar

    12) ____________ is Tomcat's servlet Container.Answer: Catalina

    13) ___________ object is used to encapsulates the retrieved datafor executeQuery() method of Statement.Answer: java.sql.ResultSet

    14) ______________ class is used to open a connection to a given database.Answer: DriverManager

    15) ________________ is the process of writing the state of an object to abyte stream.Answer: Serialization.

    16)_______________method of class HttpServletRequestused to get an array ofof all the cookies.Answer: getCookies();

    17) SMTP stands for _________________________________Answer: Simple Mail Transfer Protocol.

    JSP

    1) Which of the following statement is true?a) It has public no arguments contructor.b) It has setter and getter methods for its properties.c) If required it must be serializable.d) All statements are true.Answer: d

    2) Which one of them is not implicit object in JSP?a)javabeanb) requestc) pageContextd) none of the above.Answer:javabean

    3) JSP Syntax for comment is(a)(b)(c)(e)none of the aboveAnswer: a

    4) How many JSP Scripting elements are there?a) 1b) 2c) 3d) 4

    5) Structs is ana) Factory Design Pattern Implementationb) Bridge Design Pattern Implementationc) Singleton Design Pattern Implementationd) MVC Design Pattern ImplementationAnswer: d

    6) Controller in MVC Design Patterna) Represents for intercepting the requests from view and passes it to model for the appropriateaction.b) Represents the presentations of the application.c) Represents enterprise data and business rules.d) None of the above.Answer: a

    7) Which jar file contains JSTL API Classes?a)servlet-api.jarb) jsp-api.jarc) standar.jard) None of the above.

    8) JSP Technology separates ___________________Answer: presentation and business logic

    9) ____________ is Tomcat's JSP Engine.Answer: Jasper

    10) In order to be persistent, a Java Bean needs to implement the ______________ interface.Answer: java.io.Serializable interface.

    11. WAR stands for ____________________________Answer: Web Application Archive

    12.TLD stands for ____________________________Answer: Tag Library Descriptor

    13.______________________ file is the application deployment descriptor that contains allconfiguration information for the application.Answer: web.xml

    14. _______________________ element maps a servlet or JSP page to a URL pattern.Answer:

    15. Which one of the element embeds most elements dealing JSP configuration in web.xml.a) b) c) d) Answer: d

    16.________________ is the command to create WAR file.Answer: jar cvf*

    17._________________tag is used to declare the java bean in JSP page.Answer:

    18. Which one of the below tag library is used to handle Internalization and Locales.a) b) c)d) Answer: a

    18.Which one of the below is directive element.a) b) c) d).Answer: b

    19. JSP comment looks likea)/* .. */b) c) d) Answer: d

    20. which statement is not true about Javabeans.a) JavaBeans are not reusable software components for Java.b) They contain setter and getter methods.c) Javabean class implements Serializable Interface.d) JavaBeans are reusable software components for Java.e) None of the above.f) All the above.Answer: f

    HTML Interview Questions1. What is HTML?

    HTML (HyperText Markup Language) is a Universal language which allows an individual using special code to create web pages to be viewed on the Internet.2. What is a tag?

    In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons; to change the appearance of text, to show a graphic, or to make a link to another page.3. What is the simplest HTML page?

    HTML Code:This is my page title! This is my message to the world! Browser Display: This is my message to the world!4. How do I create frames? What is a frameset?

    Frames allow an author to divide a browser window into multiple (rectangular) regions. Multiple documents can be displayed in a single window, each within its own frame. Graphical browsers allow these frames to be scrolled independently of each other, and links can update the document displayed in one frame without affecting the others.You cant just add frames to an existing document. Rather, you must create a frameset document that defines a particular combination of frames, and then display your content documents inside those frames. The frameset document should also include alternative non-framed content in a NOFRAMES element.5. How can I include comments in HTML?

    An HTML comment begins with , and does not contain -- or > anywhere in the comment.6. What is a Hypertext link?

    A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the links destination.7. What is a DOCTYPE? Which one do I use?

    According to HTML standards, each HTML document begins with a DOCTYPE declaration that specifies which version of HTML the document uses. Many browsers use the documents DOCTYPE declaration to determine whether to use a stricter, more standards-oriented layout mode, or to use a quirks layout mode that attempts to emulate older, buggy browsers.8. Can I nest tables within tables?

    Yes, a table can be embedded inside a cell in another table. The main caveat about nested tables is that older versions of Netscape Navigator have problems with them if you dont explicitly close you TR, TD, and TH elements. To avoid problems, include closing tags for you TR, TD, an TH even though the HTML specifications dont require them.9. How do you align a table to the right (or left)?

    You use the property to float a table to the right. Put left in place of right to float right.10. How can I use tables to structure forms?

    Small forms are sometimes placed within a TD element within a table. This can be useful for positioning a form relative to other content, but it doesnt help position the form-related elements relative to each other. The table must be within the form and then use the table to position the form elements.11. How do I open a link into a new window?

    Add target=_blank to your link syntax.JavaScript interview questions and answersByadmin|May 28, 20061. Whats relationship between JavaScript and ECMAScript?- ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3.2. What are JavaScript types?- Number, String, Boolean, Function, Object, Null, Undefined.3. How do you convert numbers between different bases in JavaScript?- Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16);4. What does isNaN function do?- Return true if the argument is not a number.5. What is negative infinity?- Its a number in JavaScript, derived by dividing negative number by zero.6. What boolean operators does JavaScript support?- &&, || and !7. What does "1"+2+4 evaluate to?- Since 1 is a string, everything is a string, so the result is 124.8. How about 2+5+"8"?- Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, its concatenation, so 78 is the result.9. What looping structures are there in JavaScript?- for, while, do-while loops, but no foreach.10. How do you create a new object in JavaScript?- var obj = new Object(); or var obj = {};11. How do you assign object properties?- obj["age"] = 17 or obj.age = 17.12. Whats a way to append a value to an array?- arr[arr.length] = value;13. What is this keyword?- It refers to the current object.14. JavaScript gives HTML designers a programming tool -HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages15. JavaScript can react to events -A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element16. JavaScript can read and write HTML elements -A JavaScript can read and change the content of an HTML element17. JavaScript can be used to validate data -A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing18. JavaScript can be used to detect the visitor's browser- A JavaScript can be used to detect the visitor's browser, and - depending on the browser - load another page specifically designed for that browser19. JavaScript can be used to create cookies- A JavaScript can be used to store and retrieve information on the visitor's computer

    12. How do I let people download a file from my page?

    Once the file is uploaded to the server, you need to use an anchor reference tag to link to it.Example:Download Foo Now!13. What is an Empty HTML Tag?

    Empty HTML tags are tags that do not need to be closed when one is creating a HTML document.Example: br (