Web Programming: question bank, Modules 1 to 6, formatted
XLSX readable page or the Excel file · 23 KB
127 questions, converted from the Excel file so it reads on a phone. Colours and notes are the ones Harsh kept in the sheet.
Colour key, Harsh's usual pattern
- Blue: Asked in a previous-year paper (PYQ)
2 marks
- 1
Describe the role of the <canvas> element in HTML5. Provide an example where it might be used.
- 2
Differentiate between the <audio> and <video> tags in HTML5. Also provide their syntax
- 3
Describe the role of forms in HTML. Mention two input elements commonly used in forms.
- 4
Explain the purpose of semantic elements in HTML5. Provide two examples.
- 5
List down HTML Attributes for image tag with example
- 6
Write the HTML code to create an unordered list of your top 3 favorite programming languages.
5 marks
- 7
Differentiate between the <div> and <span> tags in HTML. Provide an example of each.
- 8
Explain the advantages of using HTML5 semantic elements over traditional non-semantic elements. Provide examples to illustrate how semantic elements improve accessibility and SEO.
- 9
Design an HTML form with fields for name, email, and a text area for comments. Include validation for the email field to ensure it is in the correct format.
- 10
Explain the Geolocation API in HTML5 and how it provides location-based information.
- 11
Describe how the dragstart, dragover, and drop events in DRAG& DROP API
- 12
Write code to generate below output using SVG
Consider SVG height & width to be 100 px. Consider the x,y coorordinate of circle to be 50 respectively and radius : 20 - 13
Draw a red rectangle on the canvas, from position (0,0) with a width of 150 and a height of 75:
10 marks
- 14
Create an SVG (Scalable Vector Graphics) element that draws a simple representation of a house. The house should include a rectangular base for the building, a triangular roof, and at least one rectangular window.
- 15
Design and implement an HTML form for user registration with fields for username, password, email, and phone number. Include client-side validation using HTML5 attributes. Describe how each validation attribute improves user input and form reliability.
- 16
Discuss the impact of HTML5's Geolocation API on web applications. Provide a code example that requests the user's location and displays it on the webpage.
- 17
Explain the process of embedding multimedia content in HTML5. Provide examples of embedding both a video and an audio file, and describe how to handle different formats and browser compatibility.
- 18
Describe the purpose and usage of the "meta" tag in HTML. How does it impact the web page?
- 19
Create a complete HTML5 webpage that includes a header, navigation bar, main content area with two sections, and a footer. Use semantic elements and ensure the page is responsive. Explain how each part contributes to the structure and functionality of the page.
- 20
Build a personal portfolio using HTML and CSS to showcase your skills and projects.
2 marks
- 21
Discuss what does CSS stand for?
- 22
Write a CSS rule to change the background color of a paragraph to blue
- 23
What is the purpose of the transform property in CSS?
- 24
Discuss is Bootstrap and Discuss is its primary purpose? Name the two main components of Bootstrap's grid system.
- 25
Describe the difference between "em" and "rem" units in CSS.
- 26
In how many ways can we add CSS to our HTML file?
- 27
Discuss in detail about Font and Text styles in CSS?
5 marks
- 28
Explain the box model and how margins, borders, padding, and content interact.
- 29
Critique the advantages and disadvantages of using inline styles versus external stylesheets
- 30
Describe how you can change the color of hyperlinks in different states (normal, hover, active, and visited) using CSS.
- 31
Provide an example of CSS code that demonstrates this." How would you change the font color of a hyperlink when a user hovers over it TO RED COLOR
- 32
Specify how hidden, overflowed content should be signaled to the user and how it can be display the content when hover over the element.
- 33
Compare and contrast relative and absolute positioning in CSS.
- 34
Describe the difference between Bootstrap’s container, container-fluid, and container-{breakpoint} classes. Provide examples of when each should be used.
10 marks
- 35
Design a CSS layout for a two-column webpage with a header, navigation bar, content area, and footer FOR GROCERY SHOPPING
- 36
Design a Portfolio Page: A portfolio page is a creative way to present your resume. Design a professional and attractive page using semantic HTML5 elements. Include following Key Features: Header section with name and personal information,Photo, links, videos, or images of your works,Section for areas of interest and Footer with social media handles
- 37
Develop a CSS rule to center an image horizontally within its container
- 38
Develop a CSS animation for a button that includes a smooth transition for hover effects, such as changing color, scaling, and adding a shadow. Provide the CSS code for the animation and explain the keyframes and transition properties used.
- 39
Design a webpage layout that combines fixed, fluid, and responsive elements using advanced positioning techniques in CSS.
- 40
Implement a table style using CSS to alternate the background colors of even and odd rows in terms of BLACK (ODD) & RED (EVEN)
- 41
Design College Information Site: Describes activities happening on campus, including academic and cultural events. This could also feature a special page for alumni. Include following Key Elements: Headings, paragraphs, line breaks, bold, italics , Navigation tags and Hyperlinks
2 marks
- 42
List 5 features of JavaScript.
- 43
How does JavaScript function differently on the client side versus the server side? Discuss the roles and use cases for each.
- 44
Justify “JavaScript” is an event-driven programming”
- 45
What is React?
- 46
What are the major features of React?
- 47
What Do you mean by events and event handlers in JavaScript?
- 48
What is the use of pop up boxes in java script?
5 marks
- 49
Where is JavaScript written? Write an example demonstrating the “welcome” message in JavaScript
- 50
Create a registration form using HTML5 and validate the form using JavaScript.
- 51
How to loop an array in JavaScript? Give example
- 52
Discuss what are functions in JavaScript?
- 53
Design a BMI calculator using Javascript
- 54
Discuss in detail about How to create components in React?
- 55
Which decision-making statements are used in JavaScript?
10 marks
- 56
Write JavaScript code that validates a username and password against user name "Siddhi" and password "abc"
- 57
List out Difference between Element and Component in React JS
- 58
Explain briefly about Built in Java script Objects?
- 59
Write a JavaScript program to find greatest of three given numbers?
- 60
Explain in detail about the difference between HTML and React event handling? with suitable example
- 61
Expalin in detailabout Function in JavaScript? Write a program using functions with arguments?
- 62
Write a JavaScript code to change a background color using buttons.
2 marks
- 63
How do you declare and assign values to variables in PHP? What are the rules for variable declaration?
- 64
Name some superglobal variables in PHP.
- 65
What is a Regular Expression? Provide use of Regular Expression.
- 66
What are constants in PHP? How are they declared and used in code?
- 67
How does an if-else statement work in PHP?
- 68
List common applications of PHP.
- 69
Differentiate between echo and print in PHP.
5 marks
- 70
Write a PHP function to add two numbers.Explain the code and discuss how functions like this are utilized in real-world applications..
- 71
Mention and elaborate on some widely used PHP coding standards or guidelines. Why are these important in development?
- 72
Describe the basic syntax of PHP and demonstrate it by writing a code snippet to display "Hello World."
- 73
Provide examples of how magic constants like _LINE_ and _FILE_ are used in PHP. Explain their significance.
- 74
What is a function in PHP? Discuss their importance and explain the different types of functions with examples.
- 75
Explain the different data types in PHP with examples.
- 76
Discuss the features of PHP in detail, highlighting its strengths and use cases.
10 marks
- 77
Explain the GET method in PHP. Design a program to create a simple login form using GET() method in PHP.
- 78
Create a simple form to accept name, address, gender, and Country fields from user, store it into the My SQL database using PHP program.
- 79
Create Department Table (DeptId, DeptName, DeptLocation, DeptSize) as follows and insert 3 records into it and Display Department table data in tabular format on webpage using PHP and MySQL.
- 80
Discuss the POST method in PHP. Design and implement a PHP program to create a simple login form using the POST method, and explain how data is handled and processed.
- 81
Elaborate magic constants in PHP with example, and why are they called "magic"?
Is there any magic constant, that’s name does not start with a double underscore? What is the correct output of the given code snippets?
<?php
$num = 10 + 20; echo " LINE "; ?> - 82
Explain the roles of cookies and sessions in PHP. Compare and contrast cookies and sessions, discussing their respective advantages and limitations. Write a PHP code snippet to check whether a cookie is set or not, and explain how it works.
- 83
Discuss strings in PHP and the various ways to manipulate them. Differentiate between single-quoted and double-quoted strings, and provide detailed explanations of PHP string functions with examples.
2 marks
- 84
What is Node.js?Name two built-in modules in Node.js.
- 85
Illustrate what does the require function do in Node.js?
- 86
Differentiate between synchronous and asynchronous code execution in Node.js.
- 87
Analyze the role of middleware in Express.js and provide examples of middleware functions.
- 88
Explain what Node.js is and how it differs from traditional server-side JavaScript. Discuss its significance in modern web development.
- 89
How does Express.js handle HTTP requests and responses?
- 90
What is the purpose of the Express.js static middleware?
5 marks
- 91
Design a Node.js code snippet that reads a file named "example.txt" and logs its content to the console.
- 92
Describe the routing mechanism in Express.js and how it helps in organizing and handling HTTP requests
- 93
Create a basic "Hello, World!" application in Node.js. Include code snippets and explanations for each step.
- 94
How do you connect a Node.js application to MongoDB?
- 95
Demonstrate the role of NPM in Node.js development. Describe how to initialize a new Node.js project, manage dependencies, and install packages using NPM.
- 96
List and describe at least three global objects available in Node.js. Provide examples of how each object can be used in a Node.js application. .
- 97
Explain the concept of modules in Node.js. Discuss the difference between built-in core modules and user-created modules.
10 marks
- 98
Can you create a RESTful API for a blogging platform using Node.js and Express.js?
- 99
Describe in detail how to send various types of responses (HTML, JSON, files) from an Express.js server to a client. Discuss the use of response methods like res.send(), res.json(), and res.sendFile(). Include code examples for each
- 100
Discuss in detail the five global objects: process, console, _dirname, _filename, global). Explain their purposes and provide practical examples of their use in Node.js applications.
- 101
Design and implement a simple Express.js application that serves a web page with user authentication. Describe the application's features, routes, and the use of middleware.
- 102
Outline the steps involved in creating a robust Express.js application from scratch. Include setting up the project structure, defining routes, implementing middleware, and serving static files. Use practical examples to illustrate each step.
- 103
Walk through the steps to create a basic "Hello, World" application in Node.js. Include code snippets, explanations, and the role of the http module in handling HTTP requests and responses.
- 104
Design and implement a feature-rich Express.js application, for task management system. Explain the application's architecture, including routes, middleware, and data storage.
2 marks
- 105
What is Django's primary purpose, and how does it help web developers achieve it?
- 106
How does Django handle URL routing and mapping to views?
- 107
Write a Django view function that renders an HTML template named "index.html" for the homepage of a website.
- 108
What is the Django template language used for?
- 109
Explain what Django is and why it is considered a popular web framework for Python.
- 110
Illustrate the purpose of Django's Object-Relational Mapping (ORM) system.
- 111
Create a Django model named "Product" with fields for name, price, and description.
5 marks
- 112
How do you create a new Django project?
- 113
Describe the MVT (Model-View-Template) architectural pattern used in Django. Explain the role of each component (Model, View, and Template) and how they interact in a Django project.
- 114
Walk through the steps required to create a basic Django project using the MVT structure. Include instructions for setting up a project directory, creating a virtual environment, and initializing a Django project. Discuss the purpose of key project files and folders.
- 115
Discuss in detail the advantages of Django over other frameworks
- 116
Compare and Contrast Django's MVT architectural pattern with traditional MVC pattern.
- 117
In a Django project, what is the purpose of the "settings.py" file, “manage.py” and where is it located?
- 118
How do Django apps enhance the organization and modularity of a Django project? Provide an example of when you might create a custom app in Django.
10 marks
- 119
Explain the process of creating views and templates in Django. Describe how views handle HTTP requests and render templates. Provide examples of creating views for displaying data from models.
- 120
Explain the concept of Django apps and their role in a Django project. Provide a step-by-step guide on how to create a new app within an existing Django project. Include instructions for defining models, views, and templates within the app.
- 121
Creating a Django project for Online Bookstore.Provide a step-by-step guide
- 122
Create a personal blog website using Django where users can read and write blog posts.
The website should have the following features:
1.User Registration and Authentication: Users should be able to register, log in, and log out.
2.Blog Posts: Users can create, edit, and delete their own blog posts.Each blog post should have a title, content, publication date, and the author's name - 123
Create a basic to-do list application using Django, where users can register, log in, and manage their to-do tasks.
- 124
Discuss how Django implements the MVT pattern and its advantages in web application development. Provide examples to illustrate your points.
- 125
Creating a Django project involves several steps.Provide Step-by-step guide to create a Django project and app for tennis club project with member app
Extras
5 marks
Explain each variable scope with example
Write a PHP program to demonstrate switch statements, if-else commands