App.js
import "./App.css";
function App() {
const name = "유석현";
const list1 = ["HTML", "CSS", "JavaScript"];
const list2 = [<li>hello</li>, <li>World</li>];
const list3 = [<h2>hello</h2>, <h1>World</h1>];
const list4 = [<a>hello</a>, <a>World</a>];
return (
<>
{}
<h1>React Start!</h1>
<hr></hr>
{}
<h2>안녕하세요, {name}입니다</h2>
<hr></hr>
{}
<h3 className="test">className</h3>
<hr></hr>
{}
<h3>array test 1</h3>
<ul>
{list1.map((item) => {
return <li>{item}</li>;
})}
</ul>
<hr></hr>
<h3>array test 2</h3>
<ol>{list2}</ol>
<hr></hr>
<h3>array test 3</h3>
{list3}
<hr></hr>
<h3>array test 4</h3>
{list4}
<hr></hr>
</>
);
}
export default App;
App.css
.test {
color: tomato;
}
View