|
Home : Tutorial Seven : Next Tutorial Tutorial Seven: Text Formatting and LayoutReadability Using tables - a series of data or image containers comprising of cells, columns and rows - is one of the main methods of gaining control over web content. This will be covered in Tutorial 9, however HTML provides some simple tags to assist in document formatting and layout. Formatting is a useful tool in guiding the readers eye to certain important features. This is particularly pertinent with web based text as it is often said that a web audience 'scans' quickly rather than reading every single word. Your ability to break text up into readable 'chunks' will pay off in the long run. White space is an underused element of good design. Do not feel that you must fill every available space with content. Use space to guide the eye towards images or important paragraphs. Conversely, use space evenly: make sure the gap between constant elements such as paragraphs is regular. The Blockquote tag was originally designed for long quotations separated from the body of text, but it is quite useful for indenting any text or element. It requires a closing tag and can be nested. You might note that we have indented, or blockquoted, and colored, most of our examples.
It is possible to achieve a little more precise control over displayed HTML by using the Preformatted Text tag, however this results in a monospaced font such as courier. Traditionally, preformatted text was used to display a representation of computer code and to align text in some semblance of table-formatting: now that tables are widely supported it is not so common. <pre>Graphic D e s i g n e r s are .. .. ..
quite h a p p y to use preformatting as it lends i t s e l f
to all sorts of
P O S S I B I L I T I E S </pre>
In this case, spaces and tabs are not ignored by the browser, they are preserved. The W3C discourages use of tabs in favour of spaces. As you can see, it is possible to use some other tags within the pre tags - such as font color and bold. The space occupied by these tags will not be counted by the browser - you will have to count spaces carefully if using <pre> for alignment. Be careful to wrap your sentences with linebreaks, otherwise the browser will display them as one long line until encountering the closing </pre> tag. With a little planning the <pre> tag can result in ascii art - a base artform that developed in the early days of computing when graphics programs were unavailable to most people. Horizontal rules, although useful, can be another design trap for the unwary. Use them sparingly and avoid running them across the full length of the page, or width=100% which is the default value.
This is
the same 1-pixel gif. Many tags have their own alignment attributes - left, right or center. There are instances where you will want to align entire sections - graphics, tables and text included. The center tag is one method for centering a block of material and although it is widely used it is not strictly a W3C supported element and may become obsolete. <center>This is how it works</center> The Div (division) tag is a W3C recommendation and has wider reaching implications when used with Style Sheets and the advanced topic of Layers. In its basic use as an alignment control, it's attributes are left, right and center. It must be accompanied by a closing tag. Although it defines the alignment of an entire block, individual elements can be overridden by other align tags. <div align="center">And this is how Div works</div> HTML was designed to cope with the basic set of ascii characters. Some characters, such as the copyright symbol and mathematical ( ° ) or grammatical ( Æ ) sets will be ignored by browsers, or cannot be input via the keyboard. To solve this problem, certain ISO Latin 1 and other characters have been assigned named or numbered entities - some work both ways, but not all work in every browser. A complete list of the entities and their browser compatability is available at htmlref.com - note that some of the characters listed can already be interpreted by browsers ie numbers. A few examples are as follows:
In the case of the ampersand, such as in the name Simon & Garfunkel, & should be used. & (&), < (<) and > ( >) are termed 'escape sequences' due to the fact that they mean something within HTML itself. Hidden comments are very useful. They are not seen on screen, being ignored by browsers, yet exist in the source code itself. They can be used as place markers, reminders, or to add copyright information.
The exclamation mark signals the browser to ignore any content until the end tag is encountered. Some HTML software, such as Dreamweaver and Cyberstudio display comments as an icon whilst you are editing a page - this can be useful as a reminder or a placeholder. It is also possible to 'comment out' HTML. For instance, if you are creating a series of lectures, you may wish to include a 'click here for the next lecture' link. If you have been using a template HTML document and the next lecture is not yet available, there is no need to completely remove the HTML link - simply surround it with comment tags. It will still exist, ready to be 'uncommented' at a later date, without having to be completely rewritten. Comments are also used with scripts such as javascript, and CSS. This tutorial series was authored by Wendy Phillips It is copyrighted which means you may not pinch any of it |