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.
JavaScript
x
29
29
1
function App() {
2
return (
3
<div className="App">
4
<table>
5
<tr>
6
<td><img class='mainlogo' src='logoWAH.png' alt='logo' width='150px' height='auto'/></td>
7
<td align="right">
8
<table style='text-align:right;width:80%'>
9
<tr>
10
<td>
11
<a class='nav-item' href='#'>
12
<span class='nav-img'>
13
<img src='image/contact.png' alt='contact' width='20px' height='20px'/>
14
</span>
15
</br>
16
<span class='contact'>Contact us 24/7</span>
17
</a>
18
</td>
19
</tr>
20
</table>
21
</td>
22
</tr>
23
</table>
24
</div>
25
);
26
}
27
28
export default App;
29
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.
Advertisement
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