Find Interview Questions for Top Companies
Ques:- Give some examples of XML DTDs
Right Answer:
1. **Internal DTD Example:**
```xml
<!DOCTYPE note [
<!ELEMENT note (to, from, heading, body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
```

2. **External DTD Example:**
```xml
<!DOCTYPE book SYSTEM "book.dtd">
<book>
<title>XML Developer's Guide</title>
<author>John Doe</author>
<year>2023</year>
<price>44.95</price>
</book>
```

3. **HTML DTD Example:**
```xml
Ques:- How can you have different number of cells for each row of a table?
Right Answer:
You can have different numbers of cells for each row of a table by using the `<tr>` tag for each row and specifying the number of `<td>` (table data) or `<th>` (table header) tags within each `<tr>`. For example:

```html
<table>
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
</tr>
<tr>
<td>Row 2, Cell 1</td>
</tr>
<tr>
<td>Row 3, Cell 1</td>
<td>Row 3, Cell 2</td>
<td>Row 3, Cell 3</td>
</tr>
</table>
```
Ques:- What is the code for a webpage which consists of an icon at the bottom and that icon shouldn’t
Right Answer:

<style>
.fixed-icon {
position: fixed;
bottom: 20px;
right: 20px;
width: 40px;
}
</style>

<img src=”icon.png” class=”fixed-icon” alt=”Icon”>
Replace “icon.png” with your icon URL. It stays fixed while scrolling.

Ques:- How do I add scrolling text to my page?
Right Answer:
To add scrolling text to your page, you can use the `<marquee>` tag like this:

```html
<marquee>Scrolling text goes here!</marquee>
```

Alternatively, you can use CSS animations for more control:

```html
<div class="scrolling-text">Scrolling text goes here!</div>

<style>
.scrolling-text {
overflow: hidden;
white-space: nowrap;
box-sizing: border-box;
animation: scroll 10s linear infinite;
}

@keyframes scroll {
0% { transform: translateX(100%); }
100% { transform: translateX(-100%); }
}
</style>
```
Ques:- What is the diffrence between HTML & DHTML…?
Right Answer:
HTML (HyperText Markup Language) is a static markup language used to create the structure of web pages, while DHTML (Dynamic HTML) is an extension of HTML that allows for dynamic changes to the content and layout of a web page using a combination of HTML, CSS, and JavaScript.
Ques:- How can I use forms for pull-down navigation menus?
Right Answer:
You can use a `<select>` element within a `<form>` to create a pull-down navigation menu. Each `<option>` within the `<select>` can represent a different link. Use JavaScript to redirect to the selected page when the user makes a selection. Here's a simple example:

```html
<form onsubmit="window.location.href=this.menu.value; return false;">
<select name="menu">
<option value="">Select a page</option>
<option value="page1.html">Page 1</option>
<option value="page2.html">Page 2</option>
<option value="page3.html">Page 3</option>
</select>
<input type="submit" value="Go">
</form>
```
Ques:- How do I center a table?
Right Answer:
To center a table, you can use the following CSS:

```css
table {
margin-left: auto;
margin-right: auto;
}
```

Alternatively, you can use the following HTML attribute:

```html
<table align="center">
```

Both methods will center the table on the page.
Ques:- In DHTML what is the difference between FontSize and Font Size ?
Right Answer:
  • fontSize is the correct JavaScript style property used in DHTML to change or access the font size of an element via the DOM.
    Example:

    element.style.fontSize = "16px";
  • Font Size (with space and capitalization) is not valid in JavaScript or CSS. It’s incorrect syntax and will not work.

✅ Use fontSize in JavaScript and font-size in CSS.
❌ Don’t use Font Size.

Ques:- How do I align a table to the right (or left)?
Right Answer:
To align a table to the right, use the following CSS:

```css
table {
margin-left: auto;
margin-right: 0;
}
```

To align a table to the left, use:

```css
table {
margin-left: 0;
margin-right: auto;
}
```
Ques:- How do I change the title of a framed document?
Right Answer:

If you’re working with HTML frames (using <frame> or <iframe>):

  1. Access the framed document via JavaScript from the parent page.

  2. Set the title of the framed (child) document using document.title.

Ques:- What is the HTML DOM?
Right Answer:
The HTML DOM (Document Object Model) is a programming interface that represents the structure of an HTML document as a tree of objects, allowing scripts to manipulate the content, structure, and style of web pages dynamically.
Ques:- What is the XML DOM?
Right Answer:
The XML DOM (Document Object Model) is a programming interface that allows developers to access and manipulate XML documents as a tree structure, where each element, attribute, and piece of text can be accessed and modified using a set of methods and properties.
Ques:- What are the attributes that make up a DHTML?
Right Answer:
The attributes that make up DHTML (Dynamic HTML) include:

1. HTML - for structure and content.
2. CSS - for styling and layout.
3. JavaScript - for interactivity and dynamic behavior.
4. Document Object Model (DOM) - for manipulating HTML elements and structure dynamically.
Ques:- What is the importance of HTML?
Right Answer:
HTML is important because it provides the basic structure of web pages, allowing content to be organized and displayed in a readable format. It enables the use of elements like headings, paragraphs, links, images, and multimedia, which are essential for creating interactive and user-friendly websites.
Ques:- What is Web Designing and its various application
Right Answer:
Web designing is the process of creating the visual layout and user experience of websites. Its various applications include designing websites for businesses, e-commerce platforms, blogs, portfolios, and online applications, ensuring they are visually appealing, user-friendly, and functional across different devices.
Comments
ipwebsoft Sep 22, 2021

Web designing is the process of creating a Website for business for commercial or branding purpose. This process includes the various things which are essential for building the great web presence.

For web designing following things are needed
Plan of action or simple website structure
Web page Layout
Content
Graphics

Basic requirement for beginners to learn web designing
HTML markup language - For structuring
CSS - For styling
JavaScript - For developing website more responsive and functional.

Web design applications:
To create an interactive source of information for accessing multiple things

Ques:- Can you design a home page for a marriage bureau?
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>Marriage Bureau Home Page</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Welcome to Our Marriage Bureau</h1>
<nav>
<ul>
<li><a href="#about">About Us</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#register">Register</a></li>
<li><a href="#contact">Contact Us</a></li>
</ul>
</nav>
</header>

<main>
<section id="about">
<h2>About Us</h2>
<p>We help


HTML, or HyperText Markup Language, is the bedrock of the World Wide Web. It’s not a programming language in the traditional sense, but a markup language that provides the structure and meaning of web content. Think of it as the skeleton of a website, defining the layout and organization of everything you see on a web page. The language works through a system of tags, which are keywords enclosed in angle brackets, like <p> for a paragraph or <img> for an image. These tags tell a web browser how to display and interpret the content. For example, a heading tag <h1> signals that the enclosed text is a main heading, and the browser will render it as such.

HTML is responsible for organizing text, links, images, tables, lists, and other elements into a coherent and readable format. It provides the semantical foundation for the content, which is crucial for accessibility tools like screen readers and for search engine optimization (SEO). While HTML creates the structure, it is often paired with other technologies to handle the aesthetics and functionality. CSS (Cascading Style Sheets) is used to style the content, controlling colors, fonts, and layouts, while JavaScript adds interactivity and dynamic behavior. Together, this trio forms the core of modern web development. Every web page you visit, from a simple blog to a complex e-commerce site, is built on an HTML foundation, making it an indispensable skill for anyone looking to build or understand websites.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

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