February 11, 2014
Type is the most basic mode of communication in web design – we use words to communicate first. Good design presents our ideas quickly & simply, making it easy for our audience to understand what we're communicating. Typestyles are specific letter forms that have been developed for presenting text on different media (stone, paper, computer screen, etc). A font is a packaged typestyle that includes additional specifications, including sizes, weights, styles (normal, italic, oblique) & spacing information.
There are two main font families used on the web:
There are a number of properties you can use to control typestyles using CSS:
* {font-family: Arial, Helvetica, sans-serif;}
p {font-size:12px;}
h1 {line-height: 2em;}
.italics {font-style: italics;}
.bold {font-weight: bold;}
.small_caps {font-variant: small-caps;}
You can also set all of them at once using the font
property, i.e. h1 {font:30px Times New Roman, serif;}
.
You can find more details on CSS font properties at W3Schools.
<h1>
, a <p>
, and an anchor tag <a>
<div></div>
<header></header>
<nav></nav>
<aside></aside>
<ul>
<li></li>
</ul>
<article></article>
<section></section>
<footer></footer>
<!doctype html>
, <html></html>
, <head></head>
,
<title></title>
and <body></body>
elements, let's create a wrapper <div></div>
holding
some additional layout elements, including a <header></header>
and another <div></div>
to hold our content elements: <nav></nav>
,
an <article></article>
, an <aside></aside>
,
and a <footer></footer>
Let's open up JSFiddle and experiment with the CSS centering porperties:
margin: xxpx auto xxpx auto; /* centers a container element */
text-align: center; /* centers text within an element */
Here's the CSS Centering Fiddle.
Let's open up JSFiddle and experiment with the CSS positioning porperties:
position: absolute;
top: 50px;
left: 0px;
z-index: -1; /* puts the element behind the others */
Here's the CSS Positioning Fiddle.
Let's open up JSFiddle and experiment with the CSS positioning porperties:
float: left;
clear: left;
Here's the CSS Float Fiddle.
Check out Liquidapsive.com to get a better idea of some of the different types of layouts your can make, depending on your users' needs.
After you have completed the reading assignment, revisit your HTML pages and create a static layout using CSS Positioning.