- Mastering CSS
- Rich Finelli
- 152字
- 2021-07-08 09:45:46
Embedded style sheets
Instead of using the best type of style sheet, the external style sheet, we can also write our rule sets in the head of HTML documents. This is called an embedded style sheet. There are plenty of reasons for not doing it this way. The main two reasons are that it hampers the workflow, and it only controls a single page of the site. What we would do is simply create somewhere in the head tag, these open and close <style> tags:
<head>
<style> </style>
</head>
Anywhere inside this open <style> tag we can start adding our rule sets, which will only affect this one page:
<head>
<style> h2 { font-size: 50px;
} </style>
</head>
Again, this isn't the most preferred place to write your styles. Keeping them in an external style sheet will, 99 percent of the time, be the best place, but you do have the option of embedding styles in the head tag of your document.
- 深度實踐OpenStack:基于Python的OpenStack組件開發
- Redis Applied Design Patterns
- SpringMVC+MyBatis快速開發與項目實戰
- Java應用開發與實踐
- 網頁設計與制作教程(HTML+CSS+JavaScript)(第2版)
- JavaScript:Moving to ES2015
- 速學Python:程序設計從入門到進階
- Fast Data Processing with Spark(Second Edition)
- ArcGIS for Desktop Cookbook
- JavaScript程序設計:基礎·PHP·XML
- Python機器學習與量化投資
- Mastering Apache Camel
- WCF技術剖析(卷1)
- Design Patterns and Best Practices in Java
- HTML5 and CSS3:Building Responsive Websites