'Does the link tag order make a difference in html? [duplicate]

I'm trying to use Google Fonts, is there any difference between the 1st case and the 2nd case? For example, whether the font defined in the styles.css file is rendered in the browser late in the second case.

<!-- 1st case -->
<link rel="stylesheet" href="google font url">
<link rel="stylesheet" href="./styles.css">
<!-- 2nd case -->
<link rel="stylesheet" href="./styles.css">
<link rel="stylesheet" href="google font url">


Solution 1:[1]

In general, CSS files are loaded in the order that they appear in the page. Thus, if your second link somehow conflicts with the first one the later will apply.

Solution 2:[2]

Yes it make a difference.

There is a simple rule the later defined overwrite earlier defined styles.

In 1st case you have some control over the final page style because you can modify attributes defined from 3rd party styles.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Husky Slava
Solution 2 ino