TAILIEUCHUNG - Học JavaScript qua ví dụ part 63

Các Tag Trong chương 1, chúng tôi nói chuyện về ba lớp của một trang web: HTML / XHTML, CSS, và JavaScript. Các lớp CSS có thể được tách ra từ các tài liệu HTML bằng cách đặt tấm phong cách trong các tập tin bên ngoài. Trong thực tế, phong cách trang bên ngoài là loại mạnh nhất nếu bạn muốn phong cách ảnh hưởng đến nhiều hơn một trang, trong thực tế, bạn có thể sử dụng cùng một phong cách cho hàng trăm, hàng ngàn, hoặc hàng triệu trang. | The External Type with a Link 555 The External Type with a Link The link Tag In Chapter 1 we talked about the three layers of a Web page HTML XHTML CSS and JavaScript. The CSS layer can be separated from the HTML document by placing style sheets in external files. In fact external style sheets are the most powerful type if you want the style to affect more than one page in fact you can use the same style for hundreds thousands or millions of pages. The file name for the external style sheet has a .css extension just as the HTML file has an .html or .htm extension and a JavaScript external file has a .js extension. To link the external file to the existing HTML file a link is created as shown here link rel stylesheet href type text css The following examples demonstrate the use of external style sheets. Example is the HTML file containing a link to the external file and Example is the .css file. It contains the style sheet but notice it does not contain style style tags. EXAMPLE html head title External Style Sheets title 1 link rel stylesheet type text css href media all -- Name of external file is . See Example 2 head 3 body h1 u External Stylin u h1 h2 Paragraph Style Below h2 p The style defined for this paragraph is found in an external CSS document. The filename ends with em .css em . Now we can apply this style to as many pages as we want to. p h2 An H2 Element h2 h3 An H3 Element h3 p This is not a em designer s dream style em but it illustrates the power. Don t you think so p body html EXPLANATION 1 The link tag is opened within the head tags of your HTML document. The link tag has a rel attribute that is assigned stylesheet. This tells the browser that the link is going to a style sheet type document. The href attribute tells the browser the name of the CSS file containing the style sheet. This is a local file called . If necessary use a complete path to the file. .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.