@correlucas
Posted
๐พHello Kenisa, congratulations for your solution!
Answering your question:
The difference between the insert the font by the HTML inside the <head>
with preconnect and into the CSS sheet with @import
is that using the first method with preconnect the font-family load faster as the preconnect
says to the html to read that information first.
There's a common use that people prefer just to drop the font code @import
into the css because is really fast to do that instead than doing that on the html.
This article explain better how to make fonts load faster and the difference between these methods: https://sia.codes/posts/making-google-fonts-faster/
Hope it helps with your doubt Kenisa, happy coding!
Marked as helpful
@KenisaRenee
Posted
@correlucas Awesome! Thanks for taking the time to answer my question and provide a link with more information!
@correlucas
Posted
@KenisaRenee You're welcome Kenisa, I was wondering the same question these days, but even knowing which method is faster I still using @import just because is practical.
Happy to hear that was useful, happy coding.