I’ve designed a webpage using Figma and tried to convert it into HTML and CSS. However, when I open the resulting HTML in a web browser, the text appears unstyled, even though I’ve linked the CSS files correctly and made sure that everything is set up appropriately.
I attempted to use various plugins in Figma for exporting code but the styles never seem to take effect. Has anyone else encountered a similar situation?
Had this frustrating issue multiple times when working with Figma exports. One thing that caught my eye in your code is you’re loading two different font families but not necessarily using them in your CSS. Sometimes the browser gets stuck trying to load external resources first before applying local styles. Try temporarily removing those Google Fonts links and see if your basic styles appear. Another issue I discovered was caching - browsers sometimes hold onto old CSS versions even after you make changes. Do a hard refresh with Ctrl+Shift+R or try opening in an incognito window. The auto-generated class names from Figma plugins are usually fine, but make sure your CSS file actually contains rules for those specific classes. Open the CSS file in a text editor and verify the selectors match exactly what’s in your HTML.
I’ve run into this exact problem before and it’s usually one of two things. First, open your browser’s developer tools (F12) and check the Network tab to see if the CSS file is actually being loaded - you’ll see a 404 error if the path is wrong. Second issue I encountered was that Figma exports often use absolute positioning and fixed dimensions that don’t translate well to responsive web layouts. The CSS might be loading but the styles themselves are conflicting with default browser styles. Try adding a simple background color or border to one of your elements as a test - if that shows up, your CSS is linking fine but the exported styles are the problem. In my experience, it’s better to use Figma exports as a reference and write the CSS manually rather than relying on auto-generated code.
sometimes the issue is browser devtools console showing javascript errors that block css from loading properly. right click > inspect element and check console tab for any red error messages - they can prevent stylesheets from applying even if the file path is correct.
check if your css file path is correct - try opening main-styles.css directly in browser to see if it loads. also those class names look auto-generated from figma which might be causing issues. manually write simpler class names and basic css first to test if linking works properly.