新手們常問我:. J; H8 @7 X! a9 Z
& n- k$ y7 |% ?! e
0 ~7 h' ^' O; i U% D, }' VSo, you've learned HTML, and you're good with graphics. You know everything you need to know to build a site, right? ( x- g. X1 Z& S K# K
. o2 a2 @8 E1 S- Y# I; ^; h
我就搞了這篇文章,希望對大家有所幫助:" ^5 Z& ^! L! e/ g
- B+ N9 Y0 d4 k: ~
Well, not exactly.
5 m4 i: z' e: @3 m) v0 `6 I, P
9 Y2 h' j+ S2 E. zWhen the World Wide Web first became popular, HTML was the only language programmers could use to create Web pages. They soon learned that HTML had some major limitations. Although HTML presented the user with a "page" of information, the Web page and the user had a limited amount of interaction; the experience was like reading the front page of a newspaper on a computer monitor. Now most computer users, whether they use Windows, Macintosh, UNIX, or a combination of the three, are accustomed to graphical applications that provide interaction. They're used to clicking buttons, entering values into text boxes, and choosing from menus. In fact, the only way to get useful work done with a computer is to interact with it. The first generation of Web pages provided information to the users, but the users could not interact with the Web the way they could with their word processors. If users wanted to interact with their Web pages, they had to send the data to the server, which contained all the "smarts." The server sent its results back to the Web page. This interaction required a great deal of extra time, effort, and overhead, and the user interface was very constrained compared to other popular applications.
; D& ?+ @& O2 K! O- S& Z J. L {3 E& \+ X q, U4 E/ { S$ O: p
Fortunately, the builders of the Internet and the World Wide Web recognized these limitations. They soon realized that if the user was denied the capability to interact with the Web page, the Web itself would become little more than a collection of information, much like a library of books. Although that collection is very useful, users demand more from their computers than a duplication of what they could find elsewhere. The capabilities of HTML began to grow and become more powerful. Soon, designers began to realize that they needed more than just HTML to make the Internet accessible and useful to the masses. Corporations that wanted to develop enterprise solutions or explore the profit potential of the Internet also began to pressure designers to give them something more. / m K8 f. E6 E. R; s* K
]2 S/ j- Q% Q( _' `
Additionally just because you can code a site doesn't mean you can publish a site, you need a domain name, a web host, and a way of transferring files from your PC to your server.
. ?: v9 Z) I" \/ w2 ]& G7 m
4 [- C% m+ V9 KAll of these topics will be discussed in turn in this article. So when you're ready, grap a cup of coffee and carry on reading!
4 A' `) ?' R0 f4 f8 S$ Z3 \. O, y+ B. f1 d9 O! x/ Y0 E
J1 N- I9 a( s3 K
) z' T% K1 ^. T4 h4 j& M
Client Side Technologies
I' i0 N- O) V4 r3 S% Z Q" J( f+ k) U3 C: ^ ^
0 i' e. S; M1 v' e" ^
Client side technologies are those that are interpreted (executed) by the user's browser. So basically when you type a website's address in your web browser, the latter will make a request to the web server where your HTML files are stored, and the HTML file is send to the browser for viewing. The different technologies that are included in the HTML page like CSS, Javascript, are all executed on the client browser. A limitation of client-side programming is that it is hard to tell what browser/platform your users are using, and it might turn out that some of the client-side technologies are not supported (or not fully supported) by the browser, thus your web page might be incorrectly displayed. Client side code, by its very nature, is also visible to anyone accessing your site, which makes it unsuitable for security functions. The section that follows will take you on a quick tour to discover the major client-side technologies.
" N+ l7 ^2 O: i& ?* U1 v) I# V8 `4 J, X, L, A% j# M
L5 L0 f/ `2 {5 F/ X* B9 a0 J1 k) U/ P) _+ T; k
CSS (Cascading Style Sheets)8 y0 C2 M3 G, |
: t" L! C u: g
/ q2 R( n& t3 LTo understand CSS, it's worth recalling back the main purpose of HTML. The latter was originally designed as a structural language, but with time and updates, HTML has been used as a tool for presentation, making use of fonts, colors and other visual elements. The purpose of CSS is now to restore HTML to its original structural language. In other words, cascading style sheets are a new way of formatting your page layout, text, fonts, images, and almost anything that controls the look and feel of your web page. It is included either in-line with the HTML file or linked as a separate file which can then be used by different HTML files. The advantage of separating the structure and look is that web pages can be tailored for different users, browsers, and platform and an obvious benefit is that updating becomes easier as all style information can be stored in one file which dictates the style on every page of your site. 7 u, f1 \2 s, s5 {
- U3 S8 M5 L( L ~0 H5 j7 kLet's take a quick example at the usage of CSS. Suppose you want all your <H1> tags to have a 10-point Verdana font. Instead of defining every all your <H1> tags in your page with these preferences, you can just use the CSS:
- U' ` u8 z9 m
' v% v% m5 r8 k: Q- j1 z& {9 c3 J4 q# y
5 I! ~2 [) f. I6 e" X
H1 {font-family: Verdana; font-size: 10pt;}/ n1 Q) ]6 t0 _6 n' D
8 V0 r+ z; b% R& d% G+ ~6 K" J- A5 i! u2 K( P2 A
But CSS usage goes far beyond that. CSS is capable of spacing out the content of a page down to the very last pixel...it can do the same when sizing text, thus giving you complete control over the look and feel of your page. In fact CSS will replace some older HTML tags in future browser versions. |
|