HTML/JavaScript Web Application Answers

Questions answered by Experts: 588

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Remove and Add Class Names

The goal of this coding exam is to quickly get you off the ground with Adding and Removing Classnames Dynamically.

Use the below reference linkimage.

https://assets.ccbp.in/frontend/content/dynamic-webapps/adding-and-removing-classnames-dynamically-op.gif


HTML

<!DOCTYPE html>

<html>


<head></head>


<body>

  <h1 class="heading-old-styles" id="heading">h1 Element</h1>

  <button id="btnEl" class="button">Remove old styles and add new styles</button>

</body>


</html>


CSS

.heading-old-styles {

  color: #00ff00;

  background-color: #000000;

}


.button {

  color: #ffffff;

  background-color: #0967d2;

  font-size: 14px;

  border-width: 0;

  border-radius: 4px;

  padding: 10px;

}


.heading-new-styles {

  color: #ff0000;

  background-color: #ffffff;

}




Include form validation for name and email. (a) Name field should take first name and last name seperated by a space. The first character of first name and the first character of last name should be in capital. Other characters should be small letters. Digits and special characters are not allowed. Eg: A Amar, Amar A, Amar Amar are valid. But a amar, A. Amar are invalid. (b) email id should be of the form eid@nitk.ac.in eid can have alphabets, numbers, underscores and dots. But eid should start with a letter and end with a letter or a number. It cannot have underscores and dots at the beginning and end of eid. It should then match for @nitk.ac.in. On invalid entry, you can show the specific error besides the field in red color.  


Product Launch Section, Devices (Size < 900px):Devices (Size >= 900px):

Instructions:

  • For the devices less than 900px, the width of image should be 180px and for the rest of devices it should be 300px.
  • The page should have the image on the right in devices equals to and above 900px.
  • The page should have the image on the top in devices below 900px.
  • For the devices less than 900px, use align self property to align the image horizontally in the center.
  • Achieve the design using the CSS Flexbox layout and Media queries.
  • Try to achieve the design as close as possible.

Use the image URL's given below.

  • https://assets.ccbp.in/frontend/intermediate-rwd/fairpods-darkpink-bg.png
  • https://assets.ccbp.in/frontend/intermediate-rwd/fairpods-blue-bg.png
  • https://assets.ccbp.in/frontend/intermediate-rwd/apple-fairpods-img.png

CSS Colors used:

Background color Hex Code values:

#ffdda9

Text color Hex Code values:

#8e62d9

#ffffff

#334155

CSS Font families used:

  • Roboto

Design a web page using HTML and CSS for a Music store. Add suitable background image.

1. Add links which can take to some description about song.

2. At the bottom mention the links for shopping, store, career and contact details


Weather Report Section.

Devices (Size < 900px):

Devices (Size >= 900px):

  • The weather conditions in the section should be horizontal for the devices equals to and above 900px.
  • The weather conditions in the section should be vertical for the devices below 900px.
  • For the weather conditions, use justify-content property with value space-around to occupy equal space for the devices less than 900px.
  • The HTML Superscript element sup specifies inline text which is to be displayed as superscript. Refer to the prefilled HTML code.

Use the image URL's given below.

  • https://assets.ccbp.in/frontend/intermediate-rwd/partly-sunny-img.png
  • https://assets.ccbp.in/frontend/intermediate-rwd/partly-cloudy-img.png
  • https://assets.ccbp.in/frontend/intermediate-rwd/rain-with-sun-img.png
  • https://assets.ccbp.in/frontend/intermediate-rwd/sunny-img.png

#ffffff20

#b96fa1

#5a3f8c

Border color Hex Code values:

#e9e9e930

Text color Hex Code values:

#ffffff

Roboto


Convert Temperature Using a drop down. If drop down selection is Fahrenheit to Celsuis , convert Fahrenheit to celsuis. if drop down selection is celsuis to Fahrenheit, convert Celsuis to Fahrenheit. All while also using a button to execute.




Create a script that asks users to input names in a text field. Sort the names and


display them in a seperate text area.


2. If the user enters an empty name, show the text field in red color. Also display an


alert box. Change the color to white when a non empty name is eneterd.


3. Add shortcut keys to text area. When user presses Ctrl+Enter, change the font style


of text in text area to italic. When user presses Shift+Enter, change the font style of


text area to normal.

Create a function that will take the array as an argument and return the average of the quizzes.

the goal of this coding exam is to quickly get you of the ground with this in the object methods

tax criteria

salary tax percentage

>= 50000 5

>= 1000000 10


quick tip

tax = salary * taxPercentage/100


input 1

stuart

developer

840000


output 1

42000


"use strict";


process.stdin.resume();

process.stdin.setEncoding("utf-8");


let inputString = "";

let currentLine = 0;


process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});


process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});


function readLine() {

 return inputString[currentLine++];

}


function main() {

 const name = readLine();

 const role = readLine();

 const salary = JSON.parse(readLine());


 function Employee(name, role, salary) {



  // Write your code here


 }


 const employee1 = // Write your code here


/* Please do not modify anything below this line */


 console.log(employee1.getTaxAmount());

}


















Javascripts: 1. Create a script that asks users to input names in a text field. Sort the names and display them in a seperate text area. 2. If the user enters an empty name, show the text field in red color. Also display an alert box. Change the color to white when a non empty name is eneterd. 3. Add shortcut keys to text area. When user presses Ctrl+Enter, change the font style of text in text area to italic. When user presses Shift+Enter, change the font style of text area to normal. I have added a demo in Iris. Attach the html and screenshots. 


LATEST TUTORIALS
APPROVED BY CLIENTS