📜  如何定义文档与外部资源的关系?

📅  最后修改于: 2021-08-30 11:00:21             🧑  作者: Mango

在本文中,我们将学习如何使用元素创建文档和外部资源之间的关系。此标签用于定义文档和外部资源之间的链接。 link 标签用于链接到外部样式表。这个元素可以出现多次,但它只出现在头部部分。
link 元素是空的,它只包含属性。

句法:

例子:

 
 
  
 
    Define the relationship between a 
        document and the external resources
 
     
 
  
 
  
    

GeeksforGeeks

      

HTML5: How to define the relationship  between a document and the external resources?

           

CSS 代码:

h1 {
    color: green;
}
  
h1, h2{
    text-align: center;
}

输出:

支持的浏览器:

  • 谷歌浏览器
  • IE浏览器
  • 火狐
  • 歌剧
  • 苹果浏览器