I am creating a website with React that has a simple search engine for some cards with information. In the Card.js file, I include a h2 tag with the name, and a p2 tag with the email. When the website is complied, the following error message appears:
index.js:1375 Warning: The tag <p2> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
in p2 (at Card.js:9)
in div (at Card.js:7)
in div (at Card.js:5)
in Card (at CardList.js:10)
in div (at CardList.js:6)
in CardList (at App.js:28)
in div (at App.js:25)
in App (at src/index.js:9)
Tried changing the p2 tag to "P2" but it does not compile.
Card.js file:
import React from 'react';
const Card = ({name, email, id}) => {
return (
<div className='tc bg-light-green dib br3 pa3 ma2 grow bw2 shadow-5'>
<img alt='photos' src={`https://robohash.org/${id}?200x200`} />
<div>
<h2>{ name }</h2>
<p2>{ email }</p2>
</div>
</div>
);
}
export default Card;
` tags in HTML, only simple `
` (paragraph), but there is `` tags like `
– Justinas Jul 07 '19 at 20:12`, `
`