Html + javascript + CSS can't get passed 13


#1

Can anyone see where I’ve gone wrong?

These are my instructions: "Add a second text input field with an id of “resultField” and a label that says "Result:"
I believe I have done it, but an error keeps popping up and I can’t get passed this lesson.

<head>
    <script type="text/javascript" src="script.js"></script>
</head>

<body>
    <form name="tempForm">
        <input type="button" value="Convert" onclick="processForm()">
        <label for="temp">Temperature:</label>
        <input type="text" id="temp" />
        
        <label for="resultField">Result: </label>
        <input type="text" id="resultField" />
    </form>
</body>

Oops, try again. Make sure your label for resultField is ‘Result:’.


#2

For some reason it works now…I didn’t change anything…


#3

You’ll need to remove the space between Result and /label,

label for=“resultField”>Result:</label


#4

Is it really necessary to have JS in HTML? This is sooo old. Unobtrusive behavior is totally achievable.


#5

This topic was automatically closed after 7 days. New replies are no longer allowed.