Download presentation
Presentation is loading. Please wait.
1
MSc. Publishing on WWW Tables and Style Sheets
2
Tables Tables are used to: Organize and display tabular data To create a layout for web pages
3
The Basic Table
4
tag WIDTHwidth of table as %age of browser window or size in pixels ALIGNleft, right, center. To align table in browser. BGCOLORset background colour of table. CELLSPACINGdistance in pixels between cells. CELLPADDINGdistance in pixels between side of cells and its contents.
5
and The tag can only contain tags The tag can contain any content.
6
Style Sheets Style sheets are defined by the W3C CSS1 specification Component of DHTML Give you control over the appearance of a web page
7
Advantages of CSS The designer has control of page appearance and typographic elements such as font size, line spacing. Style is separate from structure Style elements can be defined in CSS removing the need for elements like in the web document. HTML just defines the page structure.
8
Advantages of CSS (2) Smaller, easier to maintain documents and sites. Because the style is removed from web documents, it should be easier to correct and update content. You can link many pages to one style sheet so it should be easier to maintain a consistent appearance.
9
Disadvantages of CSS Browser earlier than Netscape Navigator 4 and Internet Explorer 3 do not support CSS Current browsers do not support CSS consistently. Even where there is apparent consistency style sheet elements may be implemented and displayed differently.
10
What is a Style Sheet? Collection of rules Rules describe how page elements (HTML tags) should display their contents. The “how” is decided by the designer
11
Anatomy of a Rule SelectorDeclaration H1 {color:red}
12
Types of Style Sheets Inline Styles Internal Style Sheets External Style Sheets
13
Style definitions stored in a text file (with extension.css) Linked to web page using:
14
Example CSS-External Style Sheet Example <LINK rel="STYLESHEET" href="external_eg.css“ type="text/css"> Style Sheets External Style Style Sheets Formatting has been done by defining an external style sheet. The HTML document now only deals with structure but not appearance
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.