Professional Documents
Culture Documents
Rawesak Tanawongsuwan
ccrtw@mahidol.ac.th
11 344–345
Text in Graphics
• Maximum flexibility obtained by treating text as
graphics and manipulating it in graphics
program
• Ideally suited to graphic design incorporating
text
• Posters, packaging, letterheads, book
jackets, CD and DVD covers,…
Vector Text
• Text set in outline fonts can be treated as
object in a vector graphics program
Bitmapped Text
• Convert text to pixels
Layout
• Most text is laid out according to conventions
Inline Formatting
• Apply formatting to spans (sequences) of
characters within a block
• Font characteristics and size
• Colour
• Baseline offset for superscripts and
subscripts
Block-level Formatting
• Each block will have default settings for the
formatting of characters (font, size, etc)
• May hyphenate
Markup
• In the early days, manuscripts were
produced on a typewrite
www.omegatype.com/ Services/editorial.asp
11 351–352
Markup
• Instructions embedded in a document to
control its formatting
Structural Markup
• In visual markup, tags or commands are used to specify
aspects of the appearance of the text such as fonts and
type sizes
• However, in structural markup, tags identify logical
elements of a document (headings, lists or tables, …)
Advantages of structural
markup
• Easy to change the appearance of a document globally by
changing the definitions of styles just once
• Consistency is ensured
Advantages of structural
markup
• Permit a separation of concerns between the appearance of a
document and its structure
Stylesheets
• Logical conclusion of structural markup:
HTML
• Hypertext Markup Language
HTML Markup
• HTML markup divides document into elements
HTML Tags
• HTML tags are used to mark-up
mark up HTML elements
• HTML tags are surrounded by the two characters
< and >
• The surrounding characters are called angle
brackets
• HTML tags normally come in pairs like <b> and
</b>
• The first tag in a pair is the start tag, the second
tag is the end tag
• The text between the start and end tags is the
element content
11
Example
11 358–359
Attributes
• Named properties of an element
Tag Attributes
• Attributes can provide additional information about the
HTML elements on your page
• This tag defines the body element of your HTML page:
<body>. With an added bgcolor attribute, you can tell
the browser that the background color of your page
should be red, like this: <body bgcolor="red">
• This tag defines an HTML table: <table>. With an added
border attribute, you can tell the browser that the table
should have no borders: <table border="0">
• Attributes always come in name/value pairs like this:
name="value"
• Attributes are always added to the start tag of an HTML
element
11
Example
11
Example
H1 text
H6 text
H5 text
H2 text
H3 text
11
HTML Links
HTML Images
• With HTML you can display images in a document
XHTML
• XHTML stands for EXtensible HyperText Markup Language
Document Structure
•<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-
strict.dtd">
<html>
<head>
…
</head>
<body>
…
</body>
</html>
11
CSS
• Styles define how to display HTML elements and
used to specify visual properties of each element
• Styles are normally stored in Style Sheets
• Styles were added to HTML 4.0 to solve a problem
• External Style Sheets can save you a lot of work
• External Style Sheets are stored in CSS files
• Multiple style definitions will cascade into one
• Can embed rules in a style element within the head
of an HTML document
11
Different styles
11
CSS Syntax
• The CSS syntax is made up of three parts: a selector, a
property and a value: selector {property: value}
Selectors
• CSS rules have the form
• selector { declarations }
• Name – declaration applies to all elements of
the named type
• Name.class – declaration applies to all
elements of the named type whose class
attribute has value class
• Name#id – declaration applies to the unique
elements of the named type whose id attribute
has value id
11 361
Declarations
• property: value;
Simple Examples
• Indent first line of each paragraph 4pc
• p { text-indent: 4pc; }
Class selectors
<p class="right">
• Say that you would like to This paragraph will be
have two types of paragraphs in right-aligned.
your document: one right-aligned </p>
paragraph, and one center-
aligned paragraph <p class="center">
HTML Lists
• ul – unordered list
• ol – ordered list
• li – list element
• Use li elements within ul and ol elements
• Within ol, li elements are automatically
numbered; ul, bulleted by default
• dl – definition list
• Use pairs of dt (term) and dd (definition)
elements within dl
11
HTML Tables
• Relatively complex constructions providing for
wide variety of tabular layout
• CSS Fonts: changes the font family, boldness, size, and the
style of a text
CSS Typography
• Five properties control font characteristics
• font-family
• font-style
• font-variant
• font-weight
• font-size
font-family
• Value is a list of font names in decreasing order of
preference
font-weight
• Terms used for font weight are relative
font-size
• Absolute sizes may be specified in any unit
Leading
• line-height property specifies leading
font property
• Combine all five font properties into a single
declaration for font
Colour
• background-color and color properties
control the colour of background and text
Alignment
• text-align property can take values left, right,
center or justify
Layout
• Similar to magazine layout and advertisement
more than book design
Layout
• Layout algorithm:
• Each element is notionally placed in a box
• Inline elements and text placed next to each
other horizontally, then fitted into available
width to form blocks
• Blocks are placed vertically on top of each
other
• Stylesheet may be used to modify placement
of elements
11 374–375
Boxes
• Each box may be surrounded by a
border
Normal Flow
• Unless explicit
positioning is
specified, boxes are
laid out using the
normal flow algorithm.
11 375
Floating Boxes
• Boxes may be 'floated' to left or right margin,
while text flows round them
Absolute Positioning
• Set position to absolute, then specify
values for top and left properties,
setting the position of the top left
corner of the box
Can change
the properties
of the table
Table Layout in Standard View
Preset Table designs
ready with set shading, rules, and text styles to produce
a coherent layout
Commands>Format Table...
Table Layout in Layout View
Make sure to click the Layout View button on the
Layout tab
More flexible
Layout with Layers
Also tables-to-layers
Add more flexibility to
layout elements in the
web page