In HTML, the reference CSS style has 3 ways: external style sheet, inner style sheet, inline style.
This code is compiled from w3school:http://www.w3school.com.cn
(1) An external style sheet, which refers to a style defined in another CSS file by using link in the head tag of the HTML file. If a style sheet needs to be used many times, using an external style sheet is the best choice.
HTML file:
CSS style, Basestyle.css:H1 {color:red}h2 {color:green}h3 {color:blue}p {color:gray}
(2) An internal style sheet that declares a style within the head tag of an HTML file. An internal style sheet should be used when a particular style is required for a single document.
(3) inline style (generally not recommended), refers to the style that specifies the contents of the tag within an HTML. Inline styles lose many of the benefits of stylesheets because of the mix of performance and content.<!--inline style--><!--No underlined links--><a href= "http://www.baidu.com" style= "Text-decoration:none" target= "_ Blank > This is a non-underlined link </a>
CSS: External style sheet/inner style sheet/inline style