0% found this document useful (0 votes)
4 views2 pages

Web Development Concepts and Examples

The document contains a series of questions and tasks related to web development, covering topics such as HTML, CSS, JavaScript, PHP, and DOM. It includes inquiries about web application tiers, HTML tags, HTTP status codes, and examples of code for various functionalities. Additionally, it discusses the structure of HTML documents, style sheets, and control statements in PHP, along with practical programming exercises.

Uploaded by

sd9541352
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Web Development Concepts and Examples

The document contains a series of questions and tasks related to web development, covering topics such as HTML, CSS, JavaScript, PHP, and DOM. It includes inquiries about web application tiers, HTML tags, HTTP status codes, and examples of code for various functionalities. Additionally, it discusses the structure of HTML documents, style sheets, and control statements in PHP, along with practical programming exercises.

Uploaded by

sd9541352
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

(Possible )

a. What are 3 different Tiers of Web application ?

b. Explain <doctype > tag in HTML

c. List any two HTTP status code with their short messages and description.

d. List any two HTTP request header with their description.

e. What is HTML tag ? How many types of tag provided by HTML?

f. Write the syntax of image tag with its attributes.

g. How one can import external stylesheet file in an HTML document?

h. How can we embed a video in an HTML 5 document.

i. How many ways are there to define a variable in JavaScript?

j. What is DHTML(Dynamic Hypertext Markup language )

k. Give an example of foreach loop in php

l. Write a PHP code to read two numbers from HTML form and show their summation

(Write only the PHP code )

• Discuss table elements of HTML with necessary attributes. Write code for an HTML
document to show at least 4 Employee records in a table . Each record should have First
Name, Last Name, Address , Id No , Department , Designation and Gross Salary .

• Explain Frame in HTML? Write a program to devide browser in to three frames to load three
different html files [Link], [Link] and [Link]. [Link] will show links of
different product .[Link] will show name of the company and [Link] will show
information about the company.

• Write short notes on following elements with example


o marquee
o video
o iframe
• What is style sheet ? How many ways are there to include style information in an HTML
document. Give an example to add style information for body , heading , paragraph and
anchor elements of an HTML document

• Discuss various List properties of CSS with short example.

• What is JavaScript ? How many ways are there to include java script in an HTML document?
Write a simple calculator program to read two numbers and show their addition subtraction
multiplication and division using JavaScript and HTML.

• Explain standard DOM (Document Object Model ) .How one can access element using the
DOM . Write a program in javaScript to read elements of an array from a text field compute
arithmetic mean and show the result in another text field.

• Write a java script Program to read a number and show the sum of the digits of that number
test that number whether palindrome or not , and test that number whether Armstrong or
not

• Write PhP and HTML program to submit employee information such as First name, Last
name, Idno, Department, Designation and Gross salary to server where server application
computes net salary after deducting 12 % Provident fund from Gross salary if net salary is
taxable then compute tax as per following slab
o Upto Rs 3 lakhs Nil
o From 3 to 6 lakhs 5%
o From 6 to 9 lakhs 10%
o From 9 to 12 lakhs 15%
o Above 12 lakhs 20%

• Discuss various control statements of PhP with their syntax. Write a PhP Program to visit
array elements using for-each model of for loop , compute average of all elements of that
array

Common questions

Powered by AI

PHP can process HTML form submissions using the $_POST or $_GET superglobals to retrieve form data. For computing net salary after deductions, PHP can subtract a specified percentage, such as 12% for Provident Fund, from the gross salary data received. To apply tax slabs, PHP compares the net salary against different thresholds and applies the respective percentage using conditional statements. The tax is then deducted to display the taxable salary .

A PHP script for processing employee data would start by capturing input data using $_POST. After basic validation, it would compute net salary by deducting a fixed percentage for Provident Fund. Tax computation follows, using conditional statements to apply appropriate slabs. Efficient elements include validation functions, clear separation of logic, computational loops or functions for repeated operations, and detailed error messages to handle exceptional cases. A well-commented script structure also aids in maintenance .

JavaScript interacts with the DOM to dynamically update content, structure, and styling of a webpage. Elements can be accessed using methods like 'getElementById', 'getElementsByClassName', or 'querySelector'. For example, to change the text of a paragraph with ID 'intro', use: 'document.getElementById('intro').innerHTML = "New content";'. These manipulations happen in real-time and do not require page reloads, enhancing user interaction .

Web applications typically have three tiers: presentation, application logic, and data storage. The presentation tier is the topmost level of the application responsible for displaying information to the user and collecting user inputs. The application logic tier, also called the middle tier, processes the inputs it receives from the presentation tier and performs computations and logical operations, often interacting with the data storage tier. The data storage tier is where the application’s data is stored and retrieved, usually by means of a database server .

The HTML '<table>' element should include attributes like '<thead>', '<tbody>', '<tr>', '<th>', and '<td>' for structure, and 'scope' for headers. Headers should use '<th>' for column titles, which improves accessibility by defining the header's scope. Employing 'id' and 'class' attributes enables styling through CSS. Example: '<table><thead><tr><th scope="col">First Name</th><th scope="col">Last Name</th></tr></thead><tbody><tr><td>John</td><td>Doe</td></tr></tbody></table>'. This not only organizes data but also ensures clarity and navigability with screen readers .

A developer can embed a video in an HTML5 document using the '<video>' tag. Important attributes include 'src' to specify the video file, 'controls' to display playback controls such as play, pause, and volume, 'autoplay' to start playback as soon as it is ready, 'loop' to restart the video after it ends, and 'muted' to start the video without sound. Example: '<video src="example.mp4" controls autoplay muted></video>' .

JavaScript can be included in HTML documents inline, internally using a '<script>' tag within the HTML, or externally via linked '.js' files. For large-scale applications, external JavaScript is preferred as it facilitates modularity, improves load times by caching, and enhances maintainability by keeping HTML and JavaScript separate. It also allows parallel loading of resources, which optimizes performance .

Two common HTTP status codes are 404 and 500. The 404 status code with the message 'Not Found' indicates that the server couldn't find the requested resource. The 500 status code, 'Internal Server Error', signifies a generic server-side problem. Understanding these codes is crucial for developers to debug applications, provide clear error messages to users, and optimize server responses for better user experience .

The '<!DOCTYPE>' tag in HTML is a declaration that precedes an HTML document to specify which version of HTML the document is written in. It ensures that the browser renders the page in standards mode, rather than quirks mode, which delivers optimal rendering. Without it, browsers might handle the page inconsistently. In HTML5, it is simply written as '<!DOCTYPE html>' .

HTML tags are the markup syntax used to define elements, which are the basic building blocks of an HTML page. For example, '<p>' is an HTML tag, while '<p>This is a paragraph.</p>' is an HTML element. Tags generally come in pairs around content (<open> and </close>), except for self-closing tags like '<img>'. Elements can have attributes providing additional information, e.g., '<img src="image.jpg" alt="description">' .

You might also like