Home > Web Front-end > Front-end Q&A > How to change the title of react project

How to change the title of react project

藏色散人
Release: 2023-01-04 09:52:09
Original
3021 people have browsed it

How to change the title of react project: 1. Open cmd in the project root directory; 2. Find and open the "index.html" file in the public folder of the project root directory; 3. Find " React App" and modify the title in the tag to the content you want to display.

How to change the title of react project

The operating environment of this tutorial: Windows 10 system, react18.0.0 version, Dell G3 computer.

How to change the title of react project?

React project to modify the tab page icon and title

1. Modify the tab page title:

Open cmd in the project root directory

Use vscode to open index.html in the public folder of the project root directory:

code public/index.html

Change

<title>React App</title>
Copy after login

to

<title>my-title</title>
Copy after login

2. Modify the tab icon:

at the project root Directory open cmd

Use vscode to open index.html in the public folder of the project root directory:

code public/index.html

Change

<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
Copy after login

to

<link rel="icon" href="%PUBLIC_URL%/my-logo.svg" />
Copy after login

Recommended learning: "react video tutorial"

The above is the detailed content of How to change the title of react project. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template