JavaScript JavaScript and the DOM Making Changes to the DOM Modifying Elements

Seth Lewis
Seth Lewis
Full Stack JavaScript Techdegree Student 7,660 Points

STUCK - not selecting <a> tag??

I don't understand how the querySelector is not selected the <a> tag. I am targeting the specific ID and I am assigning its text content to the inputValue variable.

Please help. Thank you.

var inputValue = document.querySelector('#linkName').value;

document.querySelector('#link').textConent = inputValue;
<!DOCTYPE html>
        <title>DOM Manipulation</title>
    <link rel="stylesheet" href="style.css" />
        <div id="content">
            <label>Link Name:</label>
            <input type="text" id="linkName">
            <a id="link" href=""></a>
        <script src="app.js"></script>

1 Answer

Phil Livermore
Phil Livermore
11,016 Points

Check your spelling of textContent.