SyntaxError: Expected corresponding JSX closing tag for . Line (17:9)

Tags: ,



As I am working on React.js since last week. The closing tags are already provided by me of anchor <a> tag in below snippet.

function App() {
  return (
    <div className="App">
            <table>
                <tr>
                    <td><img class='mainlogo' src='logoWAH.png' alt='logo' width='150px' height='auto'/></td>
                    <td align="right">
                    <table style='text-align:right;width:80%'>
                        <tr>
                            <td>
                                <a class='nav-item' href='#'>
                                    <span class='nav-img'>
                                    <img src='image/contact.png' alt='contact' width='20px' height='20px'/>
                                    </span>
                                    </br>
                                    <span class='contact'>Contact us 24/7</span>
                                </a>
                            </td>
                         </tr>
                     </table>
                  </td>
                </tr>
            </table>
         </div>  
     );
}

export default App;

As I am working on this, I haven’t found this type of error. I already check all the opening and closing of tags. Please find the error and give me the best possible solution.

Answer

The style attribute accepts a JavaScript object with camelCased properties rather than a CSS string.
Read https://reactjs.org/docs/dom-elements.html#style



Source: stackoverflow