I wish to have an entire html page and then a small section that uses React. I know there are better ways to do it than use create-react-app, but currently that is what I'm using. File directory is as such.
public
index.html
src
assets
images
logo.png
components
index.js
index.css
I have not touched much of the original index.html except to add the content inside the header tag. I wish to display an image inside the HTML, but currently it is only showing the alt text.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lobster+Two:100,300,400,700,900">
<link rel="apple-touch-icon" href="logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>My website</title>
</head>
<body>
<header class="header">
<div class="logo-box">
// I cannot display the image at this part, I am pretty sure the link is correct.
<img src="/mywebsite/src/assets/images/logo.png" alt="Logo" class="logo">
</div>
</header>
<div id="root"></div> // react section will go here
</body>
</html>