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 XHTML does it stand for? How is if different from HTML? Who developed it? ?
Right Answer:
XHTML stands for Extensible Hypertext Markup Language. It is stricter than HTML in terms of syntax and follows XML rules. XHTML was developed by the World Wide Web Consortium (W3C).
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:- CSS is clearly very useful for separating style from content. But apparently people tend to have problems when using it for layouts. Would you say this is because people have not yet understood how to properly do layout in CSS, or is it CSS that is lacking in this area? What can be done to improve the situation? — Would the web benefit from HTML and CSS being complemented with some kind of “layout language”?
Right Answer:
The challenges people face with CSS layouts often stem from a lack of understanding of CSS's capabilities and best practices rather than inherent limitations of CSS itself. To improve the situation, better education and resources on CSS layout techniques, such as Flexbox and Grid, can help. While a dedicated "layout language" could provide additional options, enhancing CSS and promoting its proper use is generally more beneficial for web development.
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 do I do multiple colors of text?
Right Answer:
You can use `<span>` elements with different styles for each color within a single `<div>`. For example:

```html
<div class="post-title questionitem showquestion" data-question-id="25224">
<span style="color: red;">Red Text</span>
<span style="color: blue;">Blue Text</span>
<span style="color: green;">Green Text</span>
</div>
```
Ques:- What the benefits of XHTML
Right Answer:
The benefits of XHTML include improved error handling, stricter syntax rules that promote cleaner code, better compatibility with XML tools, and enhanced accessibility for assistive technologies.
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:- Why is this XSLT important inxhtml?
Right Answer:
XSLT is important in XHTML because it allows for the transformation of XML data into a format that can be displayed as XHTML, enabling dynamic content presentation and separation of data from its presentation.
Ques:- What is XHTML Modularization?
Right Answer:
XHTML Modularization is a framework that allows for the creation of custom XHTML document types by combining different modules, enabling flexibility and reusability in web development.
Ques:- How does XHTML differ from HTML ?
Right Answer:
XHTML is a stricter and more XML-compliant version of HTML. It requires proper nesting of elements, closing of all tags, and the use of lowercase for tag names and attributes, while HTML is more lenient with these rules.


AmbitionBox Logo

What makes Takluu valuable for interview preparation?

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