
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question

Transcribed Image Text:h) Add JavaScript code to the below HTML so that the paragraphs text is sorted in reverse
order.
<! DOCTYPE html>
<html>
<body>
<h1>Reverse sorting</h1>
<p class="person">Anna</p>
<p class="person">Chloe</p>
<p class="person">Bob</p>
<p class="person">Darren</p>
</body>
</html>
After the modifications, the HTML output should be:
Reverse sorting
Darren
Chloe
Bob
Anna

Transcribed Image Text:f) Add JavaScript code to the below HTML so that the text in even rows (i.e. second and
fourth rows) is green while the text in odd rows (i.e., first and third rows) is brown.
<! DOCTYPE html>
<html>
<head></head>
<body>
<table>
<tr><td class="person">Anna</td></tr>
<tr><td class="person">Bob</td></tr>
<tr><td class="person">Chloe</td></tr>
<tr><td class="person">Darren</td></tr>
</table>
</body>
</html>
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 6 steps with 4 images

Knowledge Booster
Similar questions
- List two (2) HTML inline elements. 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Exam 1</title> 5 </head> 6 <body> 7 <h1>Some <em>HTML</em>:</h1> 8 9 <p><strong>Great School:</strong> 10 <a href=”https://www.kutztown.xn--edu-9o0a/%3EKU</a> 11 </p><br> 1 13 <span style="font-style: italic;"> 14 Stuff I like:</span> 15 <ul 16 <li>cars</li> 17 <li>music</li> 18 <li>homework (not)</li> 19 </ul> 20 </body> 21 </html>arrow_forward<DOCTYPE><html><heal><tite><meta>head><body> <p>Chapter 1, Analyze, Correct, Improve<dr> <P>HTML stands for Hyperlink Makes Learning fun.<p><p>You use presentation software to create HTML pages.</p<PHTML9 is the latest version of HTML.</p>HTML is rendered within the desktop of an operating system.</BODY>arrow_forwardMy code is like this <!doctype html> <html> <head> <title>Books Data</title> <script src= "https://code.jquery.com/jquery-3.5.1.js"> </script> <style> table { width=100%; } th { background-color:grey; } td { background-color:cyan; } </style> </head> <body> <table id="myTableData"> <tr> <th>id</th> <th>Book name</th> <th>description</th> <th>price</th> <th>author</th> <th>type</th> <th>img</th>…arrow_forward
- Edit the code to add a password and use json.stringify to store all the info correctly. Not as an object but to convert it to a string representation. Existing code: register.html <html><head><title>Registration Page</title><script src="./js/register.js"></script></head><body<br /><br /><form>Email:<input type="text" id="email" name="email"/> <br> <br> Phone:<input type="text" id="phone" name="phone"/> <br> <br> Address:<textarea id="address" name="address"> </textarea> <br> <br> City:<input type="text" id="city" name="city"/> <br> <br> State:<input type="text" id="state" name="state"/> <br> <br> ZIP Code:<input type="text" id="zip" name="zip"/> <br> <br> Contact Me:<input type="radio" id="contact" name="contact" value="text"/> Text <input type="radio" id="contact" name="contact"…arrow_forwardWhat would the output be? <!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <title>Syntax in JavaScript</title> </head> <body> <h1>JavaScript Example</h1> <p>JavaScript is a case-sensitive language,Case -sensitive means lower and upper case letters are different.</p> <script src="js/myscript.js"></script> <script> alert("Welcome to javascript world"); </script> </body></html>arrow_forwardwhich element can be appropriately placed within a <p> element? 1) <em> 2) <html> 3) <meta> 4) <title>arrow_forward
- 76) Sample HTML for webpage is given <!DOCTYPE html> <html lang “on”> <head> <title> This is the title of the page </title> <style> #content { Border : solid 12px red; Color: blue; Position: absolute; Left: 10px; } </style> </head> <body> <div>Content about the first topic.</div> <div id=content>Content about the second topic.</div> <div>Content about the third topic. </div> </body> </html> There should not be a >bracket at the end. The language attribute name in the <html> tag should not be lang. There should not be a <body> tag There should be quote marks around the content ID in the second <div> tag.arrow_forward<?xml version="1.0" encoding ="UTF-8"?><AUCTIONBLOCK><ITEM><TITLE>Vase and Stones</TITLE><ARTIST>Linda Mann</ARTIST><DIMENSIONS>20x30 inches</DIMENSIONS><MATERIALS>Oil</MATERIALS><YEAR>1996</YEAR><DESCRIPTION/><PREVIEW-SMALL SRC="images/burl-s.jpg" WIDTH="300" HEIGHT="194" ALT="Vase and Stones"><!--The small image--></PREVIEW-SMALL><PREVIEW-LARGE SRC="images/burl.jpg" WIDTH="640" HEIGHT="413" ALT="Vase and Stones"/><BIDS><BID><PRICE>3300</PRICE><TIME>9:19:32 AM</TIME><BIDDER>John</BIDDER><TIMESTAMP>1315</TIMESTAMP></BID><BID><PRICE>3200</PRICE><TIME>8:18:31 AM</TIME><BIDDER>Andrew</BIDDER><TIMESTAMP>1308</TIMESTAMP></BID><BID><PRICE>3100</PRICE><TIME>2:48:08…arrow_forward<!-- Write your code here --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title> Chapter 1, Extend Your Knowledge <p> Benjamin Bain, 9/10/2021 <hr> <p> Guideline 1.1arrow_forward
- Create an HTML that displays the menu items from the XML file. <MENU><BREAKFAST><APPETIZER><NAME>Fruit Bowl</NAME><PRICE>$10.90</PRICE></APPETIZER><SALAD><NAME>Caeser SALAD</NAME><PRICE>$3.90</PRICE></SALAD><SOUP><NAME>Chicken Noodle</NAME><PRICE>$5.90</PRICE></SOUP><ENTREE><NAME>Omelet</NAME><PRICE>$20.90</PRICE></ENTREE> <ENTREE><NAME>Scrambled Eggs</NAME><PRICE>$20.90</PRICE></ENTREE><DESSERT><NAME>Apple Pie</NAME><PRICE>$7.90</PRICE></DESSERT></BREAKFAST><BRUNCH><APPETIZER><NAME>Fruit Bowl</NAME><PRICE>$10.90</PRICE></APPETIZER> <APPETIZER><NAME>EggPlant Frits</NAME><PRICE>$10.90</PRICE></APPETIZER><SALAD><NAME>House…arrow_forwardthe html file is like this ---------------------------- <!DOCTYPE html> <html lang="en"> <head> <style>*{ background-color: gray;}a{ text-decoration: none; color: yellow; font-size: 20px;}a:hover{ transition: 1.1px;}input{ background-color: #fff;} .div1 { border:2pxoutsetred; background-color:lightblue; text-align:center; }.boxes{ float: left; width: 49%; border: 2px solid black; background-color: gray; color: #fff;} </style> <script> function maxLengthCheck(object) { if (object.value.length > object.maxLength) object.value = object.value.slice(0, object.maxLength) } function isNumeric (evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode (key); var regex = /[0-9]|\./; if ( !regex.test(key) ) { theEvent.returnValue = false; if(theEvent.preventDefault) theEvent.preventDefault(); } } function orderfunction(){ alert("Thank you for ordering from my…arrow_forwardCopy-paste code below and save it as XHTML (with extension .xhtml). Fix as many errors in the code as you can. Note: ignore the <code> tag, it was included for the proper listing purposes <code> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"></html> <!DOCTYPE html > <P>This is my first paragraph on a page<P> This Midterm is a nightmare <img src=profile.jpg alt=My Professor width=200 height= 136 border= 1 > <br> <b><I>So hard exam!<I></Ib> </code> Initial screen:arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY