When you’re working with a word processor or page layout program, style are not just named elements of a page-they also include formatting information such as the font size and style, indentation, underlining, and so on. So, when you write some text that’s supposed to be a heading, you can apply the heading style to it, and the program automatically formats that paragraph for you in the correct style.
HTML doesn’t go this far. For the most part, HTML doesn’t say anything about how a page looks when it’s viewed. HTML tag just indicate that an element is a heading or a list; they say h nothing about who that heading or list is to be formatted. So, as with the magazine example and the layout person who formats your article, the layout person’s job is to decide how big the heading should be and what font it should be in. the only thing you have to worry about is marking which section is supposed to be a heading.
NOTE
Although HTML doesn’t say much about how a page looks when it’s viewed, cascading style sheets (CSS) enable you to apply advanced formatting to HTML, which is the current version of HTML, eliminates almost all tags that are associated with formatting in favor of cascading style sheets. I’ll talk about both XHTML and CSS later today.
Web browsers, in addition to providing the networking functions to retrieve pages from the web, double as HTML formatters. When you read an HTML page into a browser such nets cape or internet explorer, the browser interprets, or parses, the HTML tags and formats the text and images on the screen. The browser has mappings between the names of page elements and actual styles on the screen; for example headings might in a larger font than the text on of the page. The browser also wraps all the text so that it fits into the current width of the window.
Different browsers running on diverse platforms might have various style mappings for each page element. Some browsers might use different font styles than others. For example a browser on a desktop computer might display italics as italics, whereas a handheld device or mobile phone might use reverse text or underlining on systems that don’t have italic fonts. Or it might put a heading in all capital letters instead of a larger font. what this means to you as a web page designer is that the pages you create with HTML might look radically different from system to system and from browser to browser. The actual information and links inside those pages are still the, but the onscreen appearance changes. You can design a web page so that it looks perfect on your computer system, but when someone else reads it on a different system, it might look entirely different (and it might very well be entirely unreadable).
No comments:
Post a Comment