Find Interview Questions for Top Companies
Ques:- What are META tags?
Right Answer:
META tags are HTML elements used to provide metadata about a webpage, such as its description, keywords, author, and character set. They are placed within the <head> section of the HTML document and help search engines and browsers understand the content of the page.
Ques:- What are the basic steps of learning file handling in c language?
Right Answer:
1. Understand the basics of file types (text and binary).
2. Learn to include the necessary header files (`<stdio.h>`).
3. Familiarize yourself with file pointers and the `FILE` structure.
4. Learn to open files using `fopen()` with appropriate modes (read, write, append).
5. Practice reading from files using functions like `fgetc()`, `fgets()`, and `fread()`.
6. Practice writing to files using `fputc()`, `fputs()`, and `fwrite()`.
7. Learn to close files using `fclose()`.
8. Handle errors using return values and `errno`.
9. Explore advanced functions like `fseek()`, `ftell()`, and `rewind()`.
Ques:- How to make text-links without underline?
Right Answer:
You can make text links without underlines by using the CSS property `text-decoration`. Here’s how you can do it:

```css
a {
text-decoration: none;
}
```
Ques:- How do I make my div 100% height?
Right Answer:
To make a div 100% height, set its height to 100% and ensure its parent element has a defined height. Use the following CSS:

```css
html, body {
height: 100%;
}

.your-div-class {
height: 100%;
}
```
Ques:- How do I specify a specific combination of frames instead of the default document?
Right Answer:
To specify a specific combination of frames instead of the default document, you can use the `<iframe>` element with the `src` attribute pointing to the desired document, and then use the `name` attribute to target specific frames. For example:

```html
<iframe name="frame1" src="page1.html"></iframe>
<iframe name="frame2" src="page2.html"></iframe>
```

You can then link to these frames using the `target` attribute in your links:

```html
<a href="page3.html" target="frame1">Load in Frame 1</a>
<a href="page4.html" target="frame2">Load in Frame 2</a>
```
Ques:- How can I make a page look the same in e.g. NS and MSIE ?
Right Answer:
To make a page look the same in Netscape (NS) and Internet Explorer (MSIE), use standard HTML and CSS, avoid browser-specific features, and test in both browsers. Utilize CSS resets or normalize stylesheets to minimize default styling differences, and validate your HTML and CSS to ensure compatibility.
Ques:- How can I specify background images?
Right Answer:
You can specify background images in CSS using the `background-image` property. For example:

```css
.selector {
background-image: url('image.jpg');
}
```
Ques:- How do I move the list bullet to the left/right?
Right Answer:
You can move the list bullet to the left or right by using the `padding-left` or `margin-left` property on the `<ul>` or `<ol>` element. For example:

```css
ul {
padding-left: 20px; /* Move bullet to the right */
}

ul {
padding-left: -20px; /* Move bullet to the left */
}
```
Ques:- Write a program to find the L.C.M. and G.C.D.of two numbers?
Right Answer:
```html
<div class="post-title questionitem showquestion" data-question-id="25183">
<p>Ques:- Write a program to find the L.C.M. and G.C.D. of two numbers?</p>
<pre>
<code>
def gcd(a, b):
while b:
a, b = b, a % b
return a

def lcm(a, b):
return abs(a * b) // gcd(a, b)

num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))

print("G.C.D. is:", gcd(num1, num2))
print("L.C.M. is:", lcm(num1, num2))
</code>
</pre>
</div>
```
Ques:- Write a script to customize the test results in PDF and HTML format.
Right Answer:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Results</title>
<style>
body { font-family: Arial, sans-serif; }
.result { margin: 20px; padding: 10px; border: 1px solid #ccc; }
</style>
</head>
<body>
<div class="result">
<h1>Test Results</h1>
<p>Score: 85%</p>
<p>Date: 2023-10-01</p>
</div>
<button onclick="downloadPDF()">Download PDF</button>
<button onclick="downloadHTML()">Download HTML</button>

<script>
function downloadPDF() {
const element = document.querySelector('.result');
html2
Ques:- How do I write my style sheet so that it gracefully cascades with user's personal sheet ?
Right Answer:
To ensure your style sheet gracefully cascades with the user's personal style sheet, follow these guidelines:

1. Use specific selectors to avoid overriding user styles unintentionally.
2. Keep your styles as generic as possible, allowing user styles to take precedence.
3. Use `!important` sparingly, as it can disrupt the cascade.
4. Place your styles in a separate CSS file and link it after the user styles, if possible.
5. Test your styles with common user styles to ensure compatibility.
Ques:- What are pseudo-elements?
Right Answer:
Pseudo-elements are special keywords in CSS that allow you to style specific parts of an element, such as the first line, first letter, or a portion of text, without needing to add extra HTML elements. Examples include `::before`, `::after`, `::first-line`, and `::first-letter`.
Ques:- Why are there gaps above and below my form in IE?
Right Answer:
Gaps above and below your form in Internet Explorer may be caused by default margin and padding settings on elements like `<body>`, `<h1>`, or `<form>`. To fix this, you can reset the margin and padding using CSS, for example:

```css
body, h1, form {
margin: 0;
padding: 0;
}
```
Ques:- How do I have a background image that isn't tiled?
Right Answer:
Use the CSS property `background-repeat` and set it to `no-repeat`. For example:

```css
background-image: url('your-image.jpg');
background-repeat: no-repeat;
```
Ques:- What is attribute selector?
Right Answer:
An attribute selector in CSS is used to select elements based on the presence or value of a specific attribute. For example, `[type="text"]` selects all input elements with a type attribute equal to "text".
Ques:- Is there anything that CAN'T be replaced by Style Sheets?
Right Answer:
Yes, certain layout structures and content logic cannot be replaced by Style Sheets; they require HTML and JavaScript for functionality.
Ques:- What can be done with style sheets that cannot be accomplished with regular HTML?
Right Answer:
Style sheets (CSS) allow for advanced styling and layout control, such as applying consistent styles across multiple pages, creating responsive designs, adding animations, and controlling the presentation of elements based on different media types, which cannot be achieved with regular HTML alone.


AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users