I have followed and installed TailwindCSS from this:
I have created a new test project and I add some code to index.html, but when I run it it does not apply TailwindCSS styles.
Here is the project structure with index.html file.
<link href="/dist/ouput.css" rel="stylesheet">
<body class="bg-blue-700">
<p class="text-3xl">Hello World</p>
</body>
Here is the content of tailwind.config.js file:
module.exports = {
content: ["./src/**/*.{html,js}"],
theme: {
extend: {},
},
plugins: [],
}
Here is my input.css file:
@tailwind base;
@tailwind components;
@tailwind utilities;
I am using this command:
npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch
After I run the app, everything is white and without changing text style, but as you can see from the code, the background should be blue and bigger text.
Where I am making the mistake?


index.htmlfile is withinsrcfolder. Change path to styles into../dist/output.cssor moveindex.htmlinto the project root (out ofsrcdirectory)<link href="../dist/output.css" rel="stylesheet">./dist/output.css, otherwise it will look this file at the root of your system. You may look at inspector what does it tell aboutoutput.cssfile (where does site cannot locate styles. which path is it). I'm almost positive this is relative path issue