Find Interview Questions for Top Companies
Ques:- How do I add midi music to my web page
Right Answer:
To add MIDI music to your web page, use the `<embed>` or `<audio>` tag. Here’s an example using the `<embed>` tag:

```html
<embed src="path/to/your/music.mid" autostart="true" loop="true" width="300" height="100">
```

Or using the `<audio>` tag:

```html
<audio controls>
<source src="path/to/your/music.mid" type="audio/midi">
Your browser does not support the audio tag.
</audio>
```
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:- Styles not showing?
Right Answer:
Check if the CSS file is linked correctly in the HTML, ensure there are no syntax errors in the CSS, verify that the styles are not being overridden by other styles, and make sure the elements have the correct class names applied.
Ques:- How do I get rid of the gap under my image?
Right Answer:
To get rid of the gap under your image, set the image's display property to `block` using CSS:

```css
img {
display: block;
}
```
Ques:- How do I get my footer to sit at the bottom?
Right Answer:
To make your footer sit at the bottom of the page, you can use the following CSS:

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

.wrapper {
min-height: 100%;
display: flex;
flex-direction: column;
}

.footer {
margin-top: auto;
}
```

Wrap your content in a `.wrapper` div and place your footer inside it with the class `.footer`.
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:- Why use Style Sheets?
Right Answer:
Style Sheets, specifically CSS, are used to separate content from presentation, allowing for easier maintenance, consistent styling across multiple pages, improved load times, and better accessibility.
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:- How do you get on with different kinds of people?
Right Answer:
I adapt my communication style to match the preferences of different individuals, actively listen to their perspectives, and remain open-minded and respectful to foster positive relationships.
Ques:- Time management means planning
Asked In :-
Right Answer:
Time management means effectively organizing and prioritizing tasks to make the best use of your time.


AmbitionBox Logo

What makes Takluu valuable for interview preparation?

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