Professional Documents
Culture Documents
(2022) SHORT Q
Q1:-What are the common uses of table and why ?
Ans:- HTML tables and CSS tables serve different purposes,
although they both involve organizing content in a tabular format.
Here are the main uses for each:
**HTML Tables:**
1. **Tabular Data:** The primary use of HTML tables is to
display tabular data in a structured format. This includes data
such as financial reports, product listings, schedules, and
survey results.
2. **Forms:** HTML tables are used to create layouts for HTML
forms. Table cells can contain form elements like input fields,
checkboxes, radio buttons, and buttons, making it easier to
align and organize form elements.
3. **Accessibility:** HTML tables can enhance accessibility by
providing a clear and organized structure for content. Screen
readers and other assistive technologies can navigate tables
more effectively, improving the user experience for people
with disabilities.
**CSS Tables:**
Q5:- How to create link that will connect to another web when
clicked?
Ans:- To create a link that connects to another web page when
clicked, you can use the HTML `<a>` (anchor) element along with
the `href` attribute to specify the URL of the destination page.
Here’s how to create a basic link:
```html
<a href=https://www.example.com>Click here to visit Example
Website</a>
```
In this example:
- `<a>` is the anchor element used to create a link.
- `href` is the attribute that specifies the URL of the destination
page.
- `https://www.example.com` is the URL of the web page you want
to link to. Replace this with the actual URL you want to link to.
- `”Click here to visit Example Website”` is the text displayed as
the link. You can change this to whatever text you want to appear
as the clickable link.
When a user clicks on the link, it will navigate them to the
specified URL in a new browser tab (or the same tab, depending
on browser settings).
(2021)
Q3:- What is span and div tag in html ? Explain with one
example?
Ans:- In HTML, `<span>` and `<div>` are both container elements
used to group and style content.
<div class="myDiv">
<h2>This is a heading in a div element</h2>
<p>This is some text in a div element.</p>
</div>
</body>
</html>
Q4:- Difference between abstraction and Encapsulation in
java language?
Ans:-
Abstraction Encapsulation
Q5:- What is static WWW and explain the pros and cons of
static WWW?
Ans:- Static WWW typically refers to a website that consists of
static web pages. These pages are fixed and do not change
content based on user input or interactions. They are pre-built and
served to users as-is, without any server-side processing or
database queries. This simplicity makes them fast, secure, and
easy to host, but they lack dynamic functionality compared to
dynamic websites.
Pros:
1. **Performance**: Static sites are usually faster because
there's no need for server-side processing or database queries.
2. **Security**: With fewer moving parts, there are fewer
vulnerabilities to exploit, making static sites generally more
secure.
3. **Scalability**: They can handle high traffic volumes without
needing to scale servers or infrastructure.
4. **Simplicity**: Building and maintaining static sites is often
simpler and requires less technical expertise.
5. **Cost-effective**: Hosting static sites can be cheaper since
they don't require as much server resources or maintenance.
Cons:
1. **Limited Functionality**: Static sites are less dynamic; they
can't process user input or generate content on-the-fly like
dynamic sites can.
2. **Updates Require Republishing**: Making changes to a
static site often involves republishing the entire site, which can be
cumbersome for large sites.
3. **Not Ideal for Complex Applications**: If your website
requires user authentication, dynamic content generation, or
complex interactions, a static site may not be the best choice.
4. **SEO Challenges**: Dynamic content can be better for SEO
as it allows for more customization and optimization based on
user behavior.
5. **Content Management**: Managing content on a static site
may require more manual effort compared to dynamic content
management systems.
(2019)
Q1:- How do you create link to sections within the same web
pages ?
Ans:- To create links to sections within the same web page, you
can use HTML anchor tags (`<a>`) combined with the `id`
attribute to specify the target section. Here’s how you can do it:
```html
<table>
<tr>
<td>150 pcs</td>
<td>1100</td>
<td>1500</td>
</tr>
<tr>
<td>110 pcs</td>
<td>15</td>
<td>150</td>
</tr>
</table>
```
Q3:- How do you create link that connects to a web page
when clicked ?
Ans:- To create a link that connects to a web page when clicked,
you use the `<a>` tag in HTML. Here's the basic syntax:
```html
<a href="URL">Link Text</a>
```
Replace "URL" with the actual URL of the web page you want to
link to, and "Link Text" with the text you want to display as the
clickable link. For example:
```html
<a href="https://example.com">Visit Example</a>
When a user clicks on "Visit Example," they will be directed to the
web page specified by the URL.
(2018)
Q2:- Does all html elements need a opening and closing tag?
Give a suitable example?
Ans:- No, not all HTML elements require both opening and
closing tags. Some elements are self-closing, meaning they don't
have any content and can be closed with a single tag. Here's an
example:
```html
<img src="example.jpg" alt="Example Image">
```
In this example, the `<img>` tag is self-closing. It's used to embed
images into a webpage and does not require a separate closing
tag.
Q3:- What are the CSS processors and why do we use them ?
Ans:- CSS preprocessors are tools that extend the functionality of
regular CSS by adding features like variables, nesting, mixins,
inheritance, and more. Examples of popular CSS preprocessors
include Sass, Less, and Stylus.
We use CSS preprocessors for several reasons:
(2017)
1. **Method Overloading**:
• In method overloading, you have multiple methods in the
same class with the same name but different parameters.
• Overloaded methods must have different parameter lists
(different number or types of parameters).
• The compiler differentiates between overloaded methods
based on the number and types of parameters.
• Overloading is resolved at compile time (static
polymorphism).
2. **Method Overriding**:
• In method overriding, you have two methods with the same
name and parameter list, one in the parent class
(superclass) and one in the child class (subclass).
• The method in the subclass overrides the method in the
superclass, providing a specific implementation.
• Overriding is typically used to provide a specific
implementation of a method in a subclass that is a
modification or extension of the behavior defined in the
superclass.
• Overriding is resolved at runtime (dynamic polymorphism).
1. **public**:
• Members declared as public are accessible from any other
class or package.
• There is no restriction on accessing public members from
any other class or package.
2. **protected**
• Members declared as protected are accessible within the
same package and by subclasses (even if they are in
different packages).
• This modifier is useful for providing accessibility within a
package and for inheritance.
(2015)
1. **Primary Key**:
• A primary key is a column or a set of columns in a table that
uniquely identifies each row or record in the table.
• It must contain unique values and cannot have NULL values.
• Primary keys enforce entity integrity, ensuring that each
record in the table is uniquely identifiable.
• Primary keys are typically used as foreign keys in other
tables to establish relationships between tables (e.g., one-to-
many or many-to-many relationships).
2. **Secondary Key**:
• A secondary key, also known as an alternate key, is a
column or a set of columns in a table that provides an
alternate way to access data.
• Unlike primary keys, secondary keys are not required to be
unique.
• Secondary keys are used for querying and indexing
purposes to improve the performance of data retrieval
operations.
• They can help in speeding up searches, sorting, and joining
operations by providing additional indexes.
**Pros:**
**Cons:**
Scripting language:
Is set of instructions to combine the outputs with different outputs
to perform a task.
• No need for compilation.
• Interpretation is required.
• Small chunks of code.
• Does not create .exe file.
(CR-AWAIS)
Department: Islamiyat
Govt Graduate college Civil lines skp