Details of this Paper





In this project, you create and?x a script that prints text strings.;1. Create a new document in your text editor.;2. Type the declaration, element, header;information, and the element. Use the strict DTD and;?Babe Ruth? as the content of the element.;3. Add the following script section to the document body;4. Add the following statements to the script section;document.write(;Babe Ruth was also known as;the "Bambino" and the "Sultan of Swat." ");5. Save the document as BabeRuth.html in your Exercises;folder for Chapter 8, and then open it in your Web browser.;You should receive an error message about a missing paren-;thesis. The problem with the code is that the string in the;document.write() statement contains nested double quota-;tion marks. To?x the problem, you need to escape the double;quotation marks with a backslash character.;6. Return to the BabeRuth.html document in your text;editor, and add escape characters to the string in the;document.write() statement, as follows;document.write(;Babe Ruth was also known as;the \"Bambino\" and the \"Sultan of;Swat\". ");7. Save the BabeRuth.html document, and then validate the;document with the W3C Markup Validation Service. Once;the document is valid, close it in your text editor and reload;it in your Web browser window. The text should be displayed;correctly without any error messages.;8. Close your Web browser window.


Paper#69503 | Written in 18-Jul-2015

Price : $22