You are on page 1of 26

1) What is HTML?

HTML stands for Hyper Text Markup Language. It is a language of


World Wide Web. It is a standard text formatting language which is
used to create and display pages on the Web. It makes the text more
interactive and dynamic. It can turn text into images, tables, links.

2) What are Tags?

HTML tags are composed of three things: an opening tag, content and
ending tag. Some tags are unclosed tags.

HTML documents contain two things:

o content, and
o tags

When a web browser reads an HTML document, the browser reads it


from top to bottom and left to right. HTML tags are used to create
HTML documents and render their properties. Each HTML tags have
different properties.

Syntax

1. <tag> content </tag>

Content is placed between tags to display data on the web page.

3) Which HTML tag is used to display the data in the tabular form?

The HTML table tag is used to display data in tabular form (row *
column). It also manages the layout of the page, e.g., header section,
navigation bar, body content, footer section. Here is the list of tags
used while displaying the data in the tabular form:
Tag Description

<table> It defines a table.


<tr> It defines a row in a table.
<th> It defines a header cell in a table.
<td> It defines a cell in a table.
<caption> It defines the table caption.
<colgroup It specifies a group of one or more columns in a table for formatting.
>
<col> It is used with <colgroup> element to specify column properties for
each column.
<tbody> It is used to group the body content in a table.
<thead> It is used to group the header content in a table.
<tfooter> It is used to group the footer content in a table.

4) How to create a nested webpage in HTML?

The HTML iframe tag is used to display a nested webpage. In other


words, it represents a webpage within a webpage. The HTML
<iframe> tag defines an inline frame. For example:

1. <!DOCTYPE html>
2. <html>
3. <body>
4. <h2>HTML Iframes example</h2>
5. <p>Use the height and width attributes to specify the size of the ifram
e:</p>
6. <iframe src="https://www.javatpoint.com/" height="300" widt
h="400"></iframe>
7. </body>
8. </html>

5) Does a hyperlink only apply to text?

No, you can use hyperlinks on text and images both. The HTML
anchor tag defines a hyperlink that links one page to another page.
The "href" attribute is the most important attribute of the HTML
anchor tag.

Syntax

1. <a href = "..........."> Link Text </a>

6) Can you create a multi-colored text on a web page?

Yes. To create a multicolor text on a web page you can use <font
color ="color"> </font> for the specific texts you want to color.

7) What is a marquee?

Marquee is used to put the scrolling text on a web page. It scrolls the
image or text up, down, left or right automatically. You should put the
text which you want to scroll within the <marquee>......</marquee>
tag.

8) How many tags can be used to separate a section of texts?

Three tags are used to separate the texts.

o <br> tag - Usually <br> tag is used to separate the line of text. It
breaks the current line and conveys the flow to the next line
o <p> tag - The <p> tag contains the text in the form of a new
paragraph.
o <blockquote> tag - It is used to define a large quoted section. If
you have a large quotation, then put the entire text within
<blockquote>.............</blockquote> tag.

9) How to make a picture of a background image of a web page?

To make a picture a background image on a web page, you should put


the following tag code after the </head> tag.

1. <body background = "image.gif">

Here, replace the "image.gif" with the name of your image file which
you want to display on your web page.

10) What is the use of a span tag? Give one example.

The span tag is used for following things:

o For adding color on text


o For adding background on text
o Highlight any color text

Example:

1. <p>
2. <span style="color:#ffffff;">
3. In this page we use span.
4. </span>
5. </p>

11) What is the use of an iframe tag?

An iframe is used to display a web page within a web page.


Syntax:

1. <iframe src="URL"></iframe>

Example:

1. <iframe src="demo_iframe.html" width="200px" height="200px"></


iframe>

Target to a link:

1. <iframe src="http://www.javatpoint.com" name="iframe_a"></


iframe>

12) What is CSS?

CSS stands for Cascading Style Sheet. It is a popular styling language


which is used with HTML to design websites. It can also be used with
any XML documents including plain XML, SVG, and XUL.

13) What is the origin of CSS?

SGML (Standard Generalized Markup Language) is the origin of


CSS. It is a language that defines markup languages.

14) Why background and color are the separate properties if they
should always be set together?

There are two reasons behind this:

o It enhances the legibility of style sheets. The background


property is a complex property in CSS, and if it is combined
with color, the complexity will further increase.
o Color is an inherited property while the background is not. So
this can make confusion further.
15) What is Embedded Style Sheet?

An Embedded style sheet is a CSS style specification method used


with HTML. You can embed the entire stylesheet in an HTML
document by using the STYLE element.

1. <style>
2. body {
3. background-color: linen;
4. }
5. h1 {
6. color: red;
7. margin-left: 80px;
8. }
9. </style>
10.

advantages of Embedded Style Sheets?

o You can create classes for use on multiple tag types in the
document.
o You can use selector and grouping methods to apply styles in
complex situations.
o No extra download is required to import the information.

16) What is a CSS selector?

It is a string that identifies the elements to which a particular


declaration apply. It is also referred as a link between the HTML
document and the style sheet. It is equivalent of HTML elements.
There are several different types of selectors in CSS: -

o CSS Element Selector


o CSS Id Selector
o CSS Class Selector
o CSS Universal Selector
o CSS Group Selector

17) Name the property for controlling the image position in the
background.

The background-position property is used to define the initial position


of the background image. By default, the background image is placed
on the top-left of the webpage.

You can set the following positions:

1. center
2. top
3. bottom
4. left
5. right

1. background: white url('good-morning.jpg');


2. background-repeat: no-repeat;
3. background-attachment: fixed;
4. background-position: center;

18) Name the property for controlling the image scroll in the
background.

The background-attachment property is used to specify if the


background image is fixed or scroll with the rest of the page in the
browser window. If you set fixed the background image, then the
image not move during scrolling in the browser. Let's take an example
with the fixed background image.

1. background: white url('bbb.gif');


2. background-repeat: no-repeat;
3. background-attachment: fixed;

19) What is the difference between class selectors and id selectors?

An overall block is given to class selector while id selectors take only


a single element differing from other elements.

CSS Class Selector


1. <style>
2. .center {
3. text-align: center;
4. color: blue;
5. }
6. </style>
7.
CSS Id Selector
1. <style>
2. #para1 {
3. text-align: center;
4. color: blue;
5. }
6. </style>
7.

20) What is the difference between inline, embedded and external


style sheets?

Inline: Inline Style Sheet is used to style only a small piece of code.

Syntax
1. <htmltag style="cssproperty1:value; cssproperty2:value;"> </
htmltag>
2.
Embedded: Embedded style sheets are put between the
<head>...</head> tags.

Syntax
1. <style>
2. body {
3. background-color: linen;
4. }
5. h1 {
6. color: red;
7. margin-left: 80px;
8. }
9. </style>
10.

External: This is used to apply the style to all the pages within your
website by changing just one style sheet.

Syntax
1. <head>
2. <link rel="stylesheet" type="text/css" href="mystyle.css">
3. </head>
4.

21) What is the CSS Box model and what are its elements?

The CSS box model is used to define the design and layout of
elements of CSS.

The elements are:

o Margin - It removes the area around the border. It is transparent.


o Border - It represents the area around the padding
o Padding - It removes the area around the content. It is
transparent.
o Content - It represents the content like text, images, etc.
22) What is JavaScript?

JavaScript is a scripting language. It is different from Java language.


It is object-based, lightweight, cross-platform translated language. It
is widely used for client-side validation. The JavaScript Translator
(embedded in the browser) is responsible for translating the
JavaScript code for the web browser.

23) Define a named function in JavaScript.

The function which has named at the time of definition is called a


named function. For example

1. function msg()
2. {
3. document.writeln("Named Function");
4. }
5. msg();
24) Name the types of functions

The types of function are:

o Named - These type of functions contains name at the time of


definition. For Example:
1. function display()
2. {
3. document.writeln("Named Function");
4. }
5. display();
o Anonymous - These type of functions doesn't contain any name.
They are declared dynamically at runtime.

1. var display=function()
2. {
3. document.writeln("Anonymous Function");
4. }
5. display();

25) How to write a hello world example of JavaScript?

A simple example of JavaScript hello world is given below. You need


to place it inside the body tag of HTML.

1. <script type="text/javascript">
2. document.write("JavaScript Hello World!");
3. </script>

26) How to use external JavaScript file?

I am assuming that js file name is message.js, place the following


script tag inside the head tag.

1. <script type="text/javascript" src="message.js"></script>


27) Is JavaScript case sensitive language?

Yes, JavaScript is a case sensitive language. For example:

1. Var msg = "JavaScript is a case-sensitive language"; //Here, var shoul


d be used to declare a variable
2. function display()
3. {
4. document.writeln(msg); // It will not display the result.
5. }
6. display();

28) How to create a function in JavaScript?

To create a function in JavaScript, follow the following syntax.

1. function function_name(){
2. //function body
3. }

29) What are the JavaScript data types?

There are two types of data types in JavaScript:

1. Primitive Data Types - The primitive data types are as follows:

Data Type Description

String represents a sequence of characters, e.g., "hello"


Number represents numeric values, e.g., 100
Boolean represents boolean value either false or true
Undefined represents an undefined value
Null represents null, i.e., no value at all
2. Non-primitive Data Types - The non-primitive data types are as
follows:

Data Type Description

Object represents an instance through which we can access members


Array represents a group of similar values
RegExp represents regular expression

30) What are the pop-up boxes available in JavaScript?

o Alert Box
o Confirm Box
o Prompt Box

Example of alert() in JavaScript


1. <script type="text/javascript">
2. function msg(){
3. alert("Hello Alert Box");
4. }
5. </script>
6. <input type="button" value="click" onclick="msg()"/>
Example of confirm() in JavaScript
1. <script type="text/javascript">
2. function msg(){
3. var v= confirm("Are u sure?");
4. if(v==true){
5. alert("ok");
6. }
7. else{
8. alert("cancel");
9. }
10.
11. }
12. </script>
13.
14. <input type="button" value="delete record" onclick="msg()"/>
Example of prompt() in JavaScript
1. <script type="text/javascript">
2. function msg(){
3. var v= prompt("Who are you?");
4. alert("I am "+v);
5.
6. }
7. </script>
8.
9. <input type="button" value="click" onclick="msg()"/>

31) What is jQuery?

jQuery is a fast, lightweight, feature-rich client-side JavaScript


library. It is cross-platform and supports different types of browsers.
It has provided a much-needed boost to JavaScript. Before jQuery,
JavaScript codes were lengthy and bigger, even for smaller functions.
It makes a website more interactive and attractive.

32) What is the difference between JavaScript and jQuery?

The simple difference is that JavaScript is a language while jQuery is


a built-in library built for JavaScript. jQuery simplifies the use of
JavaScript language.

33) What are the effects methods used in jQuery?

These are some effects methods used in jQuery:


o show() - It displays or shows the selected elements.
o hide() - It hides the matched or selected elements.
o toggle() - It shows or hides the matched elements. In other
words, it toggles between the hide() and shows() methods.
o fadeIn() - It shows the matched elements by fading it to opaque.
In other words, it fades in the selected elements.
o fadeOut() - It shows the matched elements by fading it to
transparent. In other words, it fades out the selected elements.

34) What are the selectors in jQuery? How many types of selectors in
jQuery?

If you want to work with an element on the web page, first you need
to find it. Selectors find the HTML elements in jQuery. There are
many types of selectors. Some basic selectors are:

o Name: It is used to select all elements which match with the


given element Name.
o #ID: It is used to select a single element which matches with the
given ID
o .Class: It is used to select all elements which match with the
given Class.
o Universal (*): It is used to select all elements available in a
DOM.
o Multiple Elements E, F, G: It is used to selects the combined
results of all the specified selectors E, F or G.
o Attribute Selector: It is used to select elements based on its
attribute value.

35) What is the difference between the ID selector and class selector
in jQuery?

ID selector and class selector are the same as they are in CSS. ID
selector uses ID while class selector uses a class to select elements.

You use an ID selector to select just one element. If you want to select
a group of elements, having the same CSS class, use class selector.

8) What is the use of toggle() method in JQuery?

The jQuery toggle() is a particular type of method which is used to


toggle between the hide() and show() method. It shows the hidden
elements and hides the shown element.

Syntax:
1. $(selector).toggle();
2. $(selector).toggle(speed, callback);
3. $(selector).toggle(speed, easing, callback);
4. $(selector).toggle(display);

speed: It is an optional parameter. It specifies the speed of the delay.


Its possible values are slow, fast and milliseconds.

easing: It specifies the easing function to be used for transition.

callback: It is also an optional parameter. It specifies the function to


be called after completion of toggle() effect.

display: If true, it displays an element. If false, it hides the element.


36) What is the purpose of fadeToggle() method in JQuery?

The jQuery fadeToggle() method is used to toggle between the


fadeIn() and fadeOut() methods. If the elements are faded in, it makes
them faded out, and if they are faded out, it makes them faded in.

Syntax:
1. $(selector).fadeToggle();
2. $(selector).fadeToggle(speed,callback);
3. $(selector).fadeToggle(speed, easing, callback);

speed: It is an optional parameter. It specifies the speed of the delay.


Its possible values are slow, fast and milliseconds.

easing: It specifies the easing function to be used for transition.

callback: It is also an optional parameter. It specifies the function to


be called after completion of fadeToggle() effect.

37) What is the starting point of code execution in jQuery?

$(document).ready() function is the starting point of jQuery code. It is


executed when DOM is loaded.

38) What is the basic requirement to start with the jQuery?

You need refer to its library to start with jQuery. You can download
the latest version of jQuery from jQuery.com.

39) Can you use any other name in place of $ (dollar sign) in jQuery?

Yes, instead of $ (dollar sign) we can use jQuery as a function name.


For example:
1. jQuery(document).ready(function() {
2. jQuery("p").css("background-color", "pink");
3. });

40)What is the use of the animate() method in jQuery?

The animate function is used to apply the custom animation effect to


elements. Syntax:

1. $(selector).animate({params}, [duration], [easing], [callback])

Here,

o "param" defines the CSS properties on which you want to apply


the animation.
o "duration" specify how long the animation run. It can be one of
the following values: "slow," "fast," "normal" or milliseconds
o "easing" is the string which specifies the function for the
transition.
o "callback" is the function which we want to run once the
animation effect is complete.

41)What is AJAX?

AJAX stands for Asynchronous JavaScript and XML. It is a group of


related technologies used to display data asynchronously. In other
words, it sends and retrieves data without reloading the web page.

the real web applications of AJAX currently running in the


market?

o Twitter
o Facebook
o Gmail
o Javatpoint
o Youtube

42)What is the difference between JavaScript and AJAX?


JavaScript is an object-based scripting AJAX is a group of inter-related
language. technologies like JavaScript, XML,
HTML, CSS etc
It requests the server and waits for the It sends a request to the server and
response. doesn't wait for the response.
It consumes more bandwidth as it reloads It doesn't reload the page so
the page. consumes less bandwidth.

43)How to validate a form in JavaScript?

1. <script>
2. function validateform(){
3. var name=document.myform.name.value;
4. var password=document.myform.password.value;
5.
6. if (name==null || name==""){
7. alert("Name can't be blank");
8. return false;
9. }else if(password.length<6){
10. alert("Password must be at least 6 characters long.");
11. return false;
12. }
13. }
14. </script>
15. <body>
16. <form name="myform" method="post" action="abc.jsp" onsub
mit="return validateform()" >
17. Name: <input type="text" name="name"><br/>
18. Password: <input type="password" name="password"><br/>
19. <input type="submit" value="register">
20. </form>
44)What do you mean by photoshop?Explain the organizing of layers
in Photoshop?

It is software developed by Adobe to create and edit images and


logos. By adobe photoshop adjustment and modification can be done.

Photoshop is referred to as a raster graphics editor. It is defined as a


computer program that helps in creating and editing the images on the
computer, these images can be saved in different formats like jpg,
png, etc. Photoshop was created by Thomas and John Knoll in the
year 1988. It is mainly developed by Adobe developers. It was
initially released in the year 1990. It supports the windows and Mac
operating systems. It supports platform IA-32 and x86-64. Photoshop
is widely available in 26 languages.

organizing layers are necessary for photoshop. It can be referred to as


a locked layer and an unlocked layer. If you are not working on a
particular layer, you have to lock that layer so that it should not get
affected. The layer on which you are working is an unlocked layer.
Unlock layer will always remain active and if you want to put that
layer on to other layers, its background will get affected. So, to ensure
the locking and unlocking of layers.

45)Explain the Work area in Photoshop?


The work area helps you in looking into available features and uses

and makes you comfortable easily. The work area in photoshop

consist of below:

•Application Bar: – It consists of Menu Bar with other controls like

zoom in and out.

•Menu Bar: – It consists of most of the features and commands.

•Options Bar: – In this, there are many options to use selected tools.
•Tool Box: – It is used for editing or manipulating the selected images

for work.

•Document Window: – It will tell on which image the work is going

on or the current image.

•Panel: – It will show the panels to modify the images like layering,

adjustment etc.

46)How to create a transparent background in Photoshop?

To create a transparent image you need to follows three steps:

 First go to ‘Select’ option and select the background, and then


click on ‘Inverse’. This will select your main picture.
 Open a new file, select option ‘ Transparent’ under content, and
you will have a file with transparent background.
 Copy your main picture and paste it to new file you created.

47)What are Lasso tools and name them?

With lasso tools precise area of an image can be selected, just by


tracing the selection outlines the areas are selected.

 Simple Lasso Tool


 Polygonal Lasso Tool
 Magnetic Lasso Tool

48)What is CorelDraw? For what purpose we use this software?

CorelDraw is vector graphic software. This is a drawing program for


windows in which we can create professional artwork like Logos, all
types of Cards, Calendar, Stationery, Magazines, Books etc. It is a
designing application which is the hugely used in design industry
whether it is graphic design, web design, fashion design, interior
design etc.

Before understanding the purpose of CorelDraw, first of all we should


be familiar with the following terms:

So, First I would like to explain the “Object” which is an element in a


drawing such as a shape, image, line, text, curve or symbol.

Secondly, “Drawing” which means to create logos, posters, visiting


cards, artworks & newsletters.

Thirdly, “Vector Graphic” which means an image generated from


mathematical descriptions that determine the position, length &
direction in which lines are drawn.

Fourth, “Bitmap” this includes an image which is composed by grids


of pixels.

Fifth, “Fly out” means a button that opens a group of related tools.

Sixth, “Artistic Text” which we can apply on special effects, such as


shadows.

Seventh, “Paragraph Text” which we can apply formatting options, &


which can be edited in large blocks. Therefore before we design
anything we must know about these terms.

Uses of the Software

So, as we see above as I explained as such that CorelDraw is a vector


drawing tool. Therefore, it mainly purpose to create Logo Signs & to
vectorized the images or create new fonts. It means we can also create
our designs by using this software. In this sense I say that this is
Comprehensive graphic design software in which design graphics &
layouts, social media, ads & brochures.

49) What is a shape? How do we use shapes in CorelDraw?


A shape is the form of an object or its external boundary, outline or
external surface, as opposed to other properties such as color &
texture. In other words, a geometric figure such as a square, triangle
or rectangle, polygon etc is called shape. So, CorelDraw provides five
tools for different types of shapes like – Basic Shapes, Arrow Shapes,
Flowchart Shapes , Star Shapes & Callout Shapes.
Working with the particular shape, first we should open the properties
of the object set the outline to none. By using any shape tool, we can
make any design or a pattern like-‘Polygon Tool’. Basically, Polygons
are multi-sided closed shapes. So, when we select polygon & draw it
then by default it will create pentagons. But we can also change its
properties & then we can draw a polygon with up to 500 sides which
looks like a star. Another example is ‘Shape Tool’. Shape tool is used
for reshaping the objects. Every vector object in CorelDraw is
controlled by nodes & we can move these nodes by mouse & make
changes in the object by the shape tool.

50) What is the use of Text tool?


There are 2 types of Text tool. First is “Paragraph Text”. When we
create a Paragraph text frame then we should use text tool by making
a text frame & by use of text tool properties. Even if to add paragraph
text to the inside of an object, position the pointer at the inside border
of the object, & when the pointer changes to an insert cursor, begin
typing.
So, Text tool is used to creating text object also. When we press enter
then enter applies only when we complete a paragraph. In paragraph
text there is equal alignment. We do not apply any effect in paragraph
text. Even if we stretch the content of Paragraph text then notice that
there is nothing wrong effect on the Paragraph content.

Whereas Second type of Text tool is “Artistic Text” which means we


should use necessarily ‘enter’ key after every line. There is a text limit
in Artistic Text. We can write maximum 2 lines in Artistic Text
whereas there is no limit in Paragraph Text. In Artistic Text we can
apply any effect on the content but when we increase the size of the
content, notice that there is a bad effect on content which is not good.
So, Paragraph Text is better than Artistic Text for the user.
51)What do you mean by Server-side?

Occurring on the server side of a client-server system. For example,


on the World Wide Web,
CGI scripts are server-side applications because they run on the Web
server. In contrast, JavaScript scripts are client-side because they are
executed by your browser (the client). Java applets can be either
server-side or client- side depending on which computer (the server or
the client) executes them.
52) What is ActiveX? Write a note on ActiveX controls.

A loosely defined set of technologies developed by Microsoft for


sharing
information among different applications. ActiveX is an outgrowth of
two other Microsoft technologies called OLE (Object Linking and
Embedding) and COM (Component Object Model).As a
moniker, ActiveX can be very confusing because it applies to a whole
set of COM-based technologies. Most people, however, think only of
ActiveX controls, which represent a specific way of implementing
ActiveX technologies.
A control using ActiveX technologies. An ActiveX control can be
automatically
downloaded and executed by a Web browser. ActiveX is not a
programming language, but rather a set of rules for how applications
should share information. Programmers can develop ActiveX controls
in a variety of languages, including C, C++, Visual Basic, and Java.
An ActiveX control is similar to a Java applet. Unlike Java applets,
however, ActiveX controls have full access to the Windows operating
system. This gives them much more power than Java applets, but with
this power comes a certain risk that the applet may damage software
or data on your machine. To control this risk, Microsoft developed a
registration system so that browsers can identify and authenticate an
ActiveX control before downloading it. Another difference between
Java applets and ActiveX controls is that Java applets can be written
to run on all platforms, whereas ActiveX controls are currently
limited to Windows environments. Related to ActiveX is the scripting
language VBScript that enables Web authors to embed interactive
elements in HTML documents.
53)What are the two commonly used Request methods?

The request methods tell the script how it was invoked. Based on this
information, the script
decides how to act. The request method is passed to the script using
environment variable called
REQUEST- METHOD. The two most common request methods used
are GET and POST.
GET
GET is a request for data, the same method used for obtaining static
documents. The GET
method sends request information as parameter tacked onto the end of
the URL. These parameters are passed to the CGI program in the
environment variable QUERY-STRING.
E.g.: If the script is called myprog.exe and is invoked from a link with
the form
<A HREF="cgi-bin/myprog.exe? lname=blow&fname=joe"> The
REQUEST_METHOD will be the string GET, and the
QUERY_STRING will contain lname=blow &fname=joe.
A mandatory question mark separates the name of the script from the
beginning of the QUERY_STRING. If a slash is used instead of the
question mark; the server passes the information to script using the
PATH_INFO variable instead of the QUERY_STRING
variable. POST
POST operation occurs when the browser sends data from a fill-in
form to the server. With
POST, the QUERY_STRING mayor may not be blank, depending on
the server.The data from a POSTed query gets passed from the server
to the script using STDIN. Because STDIN is a stream and the script
needs to know how much valid data is waiting, the server also
Supplies another variable, CONTENT_LENGTH, to indicate the size
in bytes of the incoming "data. The format for POSTed data is
Variable1=value1 & variable2=value2 &etc.
54) 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 to display different types of audio or video
messages. Navigator plug-ins are based on MIME filetypes.

You might also like