WEB DESIGN GARAGE [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

WEB DESIGN GARAGE [Electronic resources] - نسخه متنی

Marc Campbell

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








Attaching Style Sheets





Here it gets a little tricky. The style tag doesn't have a src attribute, so you can't use the style tag to attach an external style sheet. Instead, use the link tag:



<html>
<head>
<title>Page Title</title>
<link href="/image/library/english/10077_mystyles.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- The content of the page goes here. -->
</body>
</html>




TIP




Another alternative is to import the external style sheet. See Topic 42 for details.



You'll note a couple things about the link tag here. It doesn't have an src attribute, either, but it does have an href attribute, which works exactly the same way. The path from the current page to the external style sheet goes in there. The rel attribute describes the relation of the linked document, and the type attribute tells what kind of style sheet the linked document is. The last two attributes aren't mission critical, in that all you really need is the href attribute to attach the style sheet, but they can be useful to the software or hardware that reads the Web page, so you should try to include them.




TIP




The link tag must always appear in the head section of the HTML document. You can't put it anywhere else.



Another thing about the link tag is that it doesn't require a closing version of itself, </link>. The link tag is self-contained, while the script tag isn't. That means, when you open a script tag, always try to close it, even if you don't have any embedded JavaScript between the tags. But with a link tag, you don't have to go to the trouble.

/ 175