Q1.
Difference between Static and Dynamic Website
A static website delivers the same content to every visitor, while a dynamic website can show
customized content based on user interaction or data.
Static Website Dynamic Website
Content remains the same for all users. Content changes dynamically based on user interaction.
No database required. Usually connected to a database.
Faster loading speed. May load slightly slower due to processing.
Built using HTML, CSS. Built using HTML, CSS, JS, PHP, etc.
No server-side scripting. Uses server-side scripting.
Good for small sites. Good for large applications like e-commerce.
Q2. Web Standards and W3C Recommendation
Web standards are a set of guidelines and specifications developed to ensure the long-term growth of
the Web.
These standards are created by the World Wide Web Consortium (W3C).
They help make websites accessible, fast, and compatible across all browsers.
Examples: HTML5, CSS3, JavaScript standards, DOM, XML.
W3C Recommendations are formal standards for the web.
Q3. Definition List
A definition list is used to organize terms and their definitions in HTML. It uses three tags: , , and .
Code Example:
<dl>
<dt>HTML</dt>
<dd>Hyper Text Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
</dl>
Q4. How to Apply CSS to Text
You can apply CSS to text in three ways: Inline, Internal, and External CSS.
Code Example:
<p style='color:red;'>This is inline CSS</p>
<style>
p { font-size:20px; color:blue; }
</style>
<link rel='stylesheet' href='[Link]'>
Text properties: color, font-size, font-weight, text-align, text-decoration, etc.
Q5. Working with Block Elements
Block elements start on a new line and take up the full width available.
Examples: , , -, , , .
Code Example:
<div style='background:lightgrey;padding:10px;'>
<h2>Block Element</h2>
<p>This is a paragraph inside a div.</p>
</div>
Q6. Three kinds of Pop-up Box in JavaScript
JavaScript provides three types of pop-up boxes:
1
2
3
Code Example:
alert('Hello');
confirm('Are you sure?');
prompt('Enter your name:');
Q7. Design a Student Registration Form
HTML form elements are used to collect user input.
Code Example:
<form>
<input type='text' placeholder='Name'>
<input type='email' placeholder='Email'>
<input type='password' placeholder='Password'>
<button>Register</button>
</form>
Q8. Explain the List and Table Tag
HTML supports ordered lists (), unordered lists (), and tables ().
Code Example:
<ul><li>Item 1</li><li>Item 2</li></ul>
<table border='1'>
<tr><th>Name</th><th>Age</th></tr>
<tr><td>Ali</td><td>20</td></tr>
</table>
Q9. AJAX and Its Application
AJAX (Asynchronous JavaScript and XML) allows web pages to update asynchronously by exchanging
data with the server behind the scenes.
Code Example:
var xhttp = new XMLHttpRequest();
[Link]('GET', '[Link]', true);
[Link]();
Used for dynamic content loading without refreshing the page.
Q10. Steps of Planning a Website
1. Define purpose and goals.
2. Identify target audience.
3. Create a sitemap and wireframe.
4. Design layout and interface.
5. Develop and test.
6. Launch and maintain.
Q11. Background Properties of a Webpage
CSS properties to set background: background-color, background-image, background-repeat,
background-size, background-position.
Code Example:
body {
background-color: lightblue;
background-image: url('[Link]');
background-repeat: no-repeat;
background-size: cover;
}
Q12. Padding, Margin and Border in CSS
• Padding: Space between content and border. • Margin: Space outside the border. • Border: Line
around the element.
Code Example:
div {
padding: 20px;
margin: 10px;
border: 2px solid black;
}
Q13. Box Model in CSS
The CSS box model consists of Content, Padding, Border, and Margin.
Code Example:
div {
width: 200px;
padding: 10px;
border: 5px solid black;
margin: 15px;
}
Total width = content + padding + border + margin
Q14. Web Development Strategies
1. Responsive Design 2. Progressive Enhancement 3. Mobile-first development 4. Accessibility
considerations 5. Security best practices 6. Performance optimization
Q15. Short Note on Domain Name
A domain name is the address of a website on the Internet (e.g., [Link]).
It has two parts: Second-Level Domain (SLD) and Top-Level Domain (TLD).
Example: in [Link] — 'google' is SLD and '.com' is TLD.
Q16. Difference between ID and Class in CSS
In CSS, ID and Class are selectors used to style elements.
ID Class
Uses # selector. Uses . selector.
Unique for a page. Can be reused multiple times.
Higher specificity. Lower specificity.
Example: #header {color:red;} Example: .title {color:blue;}