انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Lecture 4 Part II

الكلية كلية تكنولوجيا المعلومات     القسم قسم البرامجيات     المرحلة 4
أستاذ المادة احمد حبيب سعيد العزاوي       25/10/2012 20:59:53
Cascading Style Sheet (CSS):
Defining Style Sheets: A style sheet is usually a text file that is separate from your HTML document. Style sheets can also be internal, residing within your HTML code. A style sheet holds formatting codes that control your Web page’s appearance. You can use style sheets to change the look of any Web page element, such as paragraphs, lists, backgrounds, and more. Anytime you want to apply the formatting from an external style sheet to an HTML document, you attach the style sheet to the page using a LINK tag. Style sheet files have a .css file extension.
Problems of HTML Formatting
1: One of the problems with using HTML for formatting is that it only offers a limited set of options to style your pages: You can use tags like , , and to change the appearance of text and use attributes like bgcolor to change the background color of HTML elements. You also have a number of attributes at your disposal for changing the way links appear in your page. Obviously, this feature set isn’t rich enough to create the attractive web pages that your users expect and demand.
2: Another problem of HTML with a lot more impact on how you build your web pages is the way the styling information is applied to the page. By design, HTML forces you to embed your formatting in your HTML document, making it harder to reuse or change the design later. Consider the following example:


This is red text, in an Arial type face and slightly larger than the default text. The problem with this code snippet is that the actual data (the text in the

element) is mixed with the presentation (the formatting of the text with the tag in this example).
3: another problem with HTML formatting is the fact that you can’t easily change the formatting at runtime in the user’s browser: With the HTML from the previous code snippet, there is no way to let your visitor change things like the font size or color, a common request to help people who are visually impaired. If you want to offer your visitors an alternative version of the page with a larger font size or a different color, you’d need to create a copy of the original page and make the necessary changes.
4: The final problem with HTML formatting is that all additional markup in your page adds considerably to the size of the page: This makes it slower to download and display as the information needs to be downloaded with each page in your web site. It also makes it harder to maintain your pages as you’d need to scroll through large HTML files to find the content you need.


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .