Home/index page
Home/index page SOLUTION…. <!DOCTYPE html><html lang=”en”><head><meta charset=”UTF-8″><title>My Website – Home</title><link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css”></head><body><!– Navbar –><nav><a href=”index.html”>MyWebsite</a><div><ul><li><a href=”register.html”>Register</a></li><li><a href=”login.html”>Login</a></li><li><a href=”stock.html”>Stock</a></li><li><a href=”about.html”>About</a></li></ul></div></nav> <!– Hero Section –><div><h1>Welcome to My Website</h1><p>Your one-stop solution for blogs and stock updates</p></div> <div><h2>Featured Content</h2><p>This is a simple home page designed using Bootstrap 4.</p></div></body></html> OUTPUT My Website – Home MyWebsite Register Login Stock About Welcome […]
Write a note on Date object in javascript. Explain any 5 date methods with example.
Write a note on Date object in javascript. Explain any 5 date methods with example. SOLUTION…. JavaScript Date object — short note The JavaScript Date object represents a specific moment in time (internally as milliseconds since the Unix epoch: 1 Jan 1970 UTC). It provides methods to create, read and modify date/time values and to […]
Write a note on JavaScript events.
Write a note on JavaScript events. SOLUTION…. 🔹 JavaScript Events In JavaScript, an event is an action or occurrence that happens in the browser, which the program can respond to. Events are usually triggered by user interactions such as clicking a button, typing text, or moving the mouse, but they can also be triggered automatically […]
Differentiate between alert and prompt dialog box giving suitable example.
Differentiate between alert and prompt dialog box giving suitable example. SOLUTION…. Feature Alert Prompt Purpose Used to display a message to the user Used to take input from the user User Input Does not take input (only shows “OK” button) Accepts user input through a text field Return Value Returns undefined (nothing to capture) Returns […]
Give difference between client-side scripting and server-side scripting.
Give difference between client-side scripting and server-side scripting. SOLUTION…. Aspect Client-Side Scripting Server-Side Scripting Execution Runs on the user’s browser (client machine) Runs on the web server Examples JavaScript, HTML, CSS, jQuery PHP, Python, Java, ASP.NET, Node.js Purpose Used for form validation, UI effects, interactivity, animations Used for database operations, authentication, business logic, file handling […]
Explain Bootstrap Grid System.
Explain Bootstrap Grid System. SOLUTION…. The Bootstrap grid is a responsive, mobile-first system that uses rows and columns (based on Flexbox) to arrange page content into a 12-column layout that adapts across screen sizes. Core concepts Container: Wraps your grid. Use .container (fixed max-width at breakpoints) or .container-fluid (full width). There are also breakpoint-specific containers […]
Explain Form elements with example.
Explain Form elements with example. SOLUTION…. Form Elements in HTML Forms in HTML are used to collect user input such as text, numbers, emails, and choices. The <form> tag is the container, and inside it we use different form elements to accept different kinds of data. 1. <input> Element The <input> tag is the most […]
Explain inline, internal(embedded) and external stylesheet with example.
Explain inline, internal(embedded) and external stylesheet with example. SOLUTION…. 1. Inline Stylesheet In inline CSS, styles are written directly inside the HTML tag using the style attribute. It affects only that specific element. Useful for quick styling but not recommended for large projects because it reduces readability and reusability. Example: 2. Internal (Embedded) Stylesheet In […]
Explain any 5 basic tags of HTML.
Explain any 5 basic tags of HTML. SOLUTION…. 1. <html> Tag The <html> tag is the root element of an HTML document. It tells the browser that the content inside is written in HTML. All other tags must be placed inside <html> and </html>. Example: 2. <head> Tag The <head> tag contains metadata (data about […]
Explain the concept of default argument with an example.
Explain the concept of default argument with an example. SOLUTION…. Default arguments in C++ Definition (short):A default argument gives a parameter a value that the caller can omit. If the caller does not provide that argument, the compiler supplies the default at the call site. Why useful:They simplify calls and reduce the need for many […]
