Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

<!DOCTYPE html> <html> <head> <title> Lab 5 part 2 </title> <meta charset = \"UT

ID: 3862983 • Letter: #

Question

<!DOCTYPE html>

<html>

<head>

<title> Lab 5 part 2 </title>

<meta charset = "UTF-8">

<link rel = "12p1.html" href = http://weblab.kennesaw.edu/tools/crescent_wrench.jpg;/>

<script >

<!--

//<![CDATA]

function picture() {

var s = "";

var a = "";

if(pic ==1){

s = http://weblab.kennesaw.edu/tools/crescent_wrench.jpg;

a = "Picture of a crescent wrench!";

} else if (pic==2) {

s = http://weblab.kennesaw.edu/tools/hedge_clippers.jpg;

a = "Picture of a hedge clipper!";

} else if(pic==3) {

s = http://weblab.kennesaw.edu/tools/pitchfork.jpg;

a = "Picture of a pitchfork!";

}

if(pic == 3){

pic = 0;

}

pic++;

document.getElementById("tool").src = s;

document.getElementById("tool").alt = a;

}

var pic = 2;

//]]>

//-->

</script>

</head>

<body>

<img src = http://weblab.kennesaw.edu/tools/crescent_wrench.jpg; id = "tools" alt = "crescent_wrench" height = "200" width = "200">

<br/>

<divbutton">Crescent_wrench</button>

<button type = "button">Hedge_clippers</button>

<button type = "button">Pitchfork</button>

</div>

<p> I choose to do this with javascript .When the button is clicked on ,it passes .

</p>

</body>

</html>

output

(X)HTML5 validation results for g2.html

Validator Input

Error: Bad value 12p1.html for attribute rel on element link: The string 12p1.html is not a registered keyword.

From line 6, column 9; to line 6, column 94

> <link rel = "12p1.html" href = http://weblab.kennesaw.edu/tools/crescent_wrench.jpg;/>

Error: No space between attributes.

At line 46, column 42

button type = "button" onclick

Error: Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.

At line 46, column 48

type = "button" is not serializable as XML 1.0.

From line 45, column 21; to line 46, column 102

<divbutton">Cresce

Error: Attribute button" not allowed on element div at this point.

From line 45, column 21; to line 46, column 102

<divbutton">Cresce

Attributes for element div:

Global attributes

Error: Stray end tag button.

From line 46, column 118; to line 46, column 126

ent_wrench</button>

There were errors. (Tried in the text/html mode.)

Used the HTML parser.

Total execution time 20 milliseconds.

About this Service • More

please fix these errors and update it asap.need to submit

AddressFile UploadText Field Show Image Report Show Source

Explanation / Answer

<!DOCTYPE html>
<html>
<head>
<title> Lab 5 part 2 </title>
<meta charset = "UTF-8">
</head>
<body>
<img src="http://weblab.kennesaw.edu/tools/crescent_wrench.jpg" id = "tools" alt = "crescent_wrench" height = "200" width = "200"><br/>
<div>
<button>Crescent_wrench</button>
<button>Hedge_clippers</button>
<button>Pitchfork</button>
</div>
<p> I choose to do this with javascript .When the button is clicked on, it passes.</p>
<script >
function picture(pic){
var s = "";
var a = "";
if(pic ==1){
s = "http://weblab.kennesaw.edu/tools/crescent_wrench.jpg";
a = "Picture of a crescent wrench!";}
else if (pic==2){
s = "http://weblab.kennesaw.edu/tools/hedge_clippers.jpg";
a = "Picture of a hedge clipper!";}
else if(pic==3){
s = "http://weblab.kennesaw.edu/tools/pitchfork.jpg";
a = "Picture of a pitchfork!";}
document.getElementById("tools").src = s;
document.getElementById("tools").alt = a;}
</script>
</body>
</html>

1. There is noneed to write link tag as you are using inline css.

2. In div tag write double quotes before end of tag and remove semicolon after picture(1) in button. No need to write type of button.

3. Always try to write javascript function with script tag at the end of the body section in html.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote