Showing posts with label Banner. Show all posts
Showing posts with label Banner. Show all posts

Thursday, May 31, 2012

Mystery of the Dead Banner

Yah, it was one of those days, no it wasn't dark, dreary and stormy. Not a chance, it was time for Web Class and out side it was even partially sunny with a slight evening breeze.

We we're learning how to divide, section, slice-up  --layout a web page. Instead of using the old xhtml style of using well named div's we were implementing features from the new kid on the block, html5.

In html5 it's a really good idea to contain or wrap ALL the sections of the layout with a <div> element. This changes the relationship of the pages sections from being related directly to the <body> of the page. The sections will now be the "child" of the containing wrapper <div>. That way we can move the entire layout by simply centering the wrapper div, or making the entire layout fluid so it always fills the page 100% no matter the size of the browser window.

So, to begin, our markup looked like this… We gave the wrapper a specific size and background color so we could actually see it on the page… we also decided the layout would be fixed and centered in the browser's screen.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>A Very Basic HTML5 Web Page</title>
<style type="text/css" media="screen">
html, body, div, header, footer, aside, nav, article, section, { margin: 0; padding: 0; }
header, footer, aside, nav, article, section { display: block; }

#wrapper {width: 960px;
height: 768px;
background-color: #ddd;
margin: 0 auto;
banner {width: 960px;
height: 160px;
background-color: yellow; }

</style>
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
</head>

<body>
<div id="wrapper">

</div> <!-- Comment:   closing div for the wrapper --> 

</body>

</html>

 But, you'll notice a very interesting declaration in the embedded styles 

header, footer, aside, nav, article, section { display: block; }

and, this where we found the dead banner!  Let me explain.

The first "thing" that appears on a web page, I like to call the "banner" in xhtml that's what I name the id for that part of the page, <div  id = "banner">!  

In html5 there are very specific, well defined names for dividing up a web page.  Google searched and analyzed 3 Billion web pages to find common id names for web page divisions, and later the html5 consortium searched and anaylsed 3 Million web pages… and, the common division names are: header, nav and footer.

Somewhere, a long time ago, in the mists of the past I had read that you could, if you wanted to, you could use any name for a division of an html5 web page and long as you declared it, and told the browsers to make it display like a block element… So as an <aside> (to me, anyway) using <banner> instead of <header>, is much less confusing, since in html5, headings and <head> also exist.

Even possibly more confusing is the fact that in html5 a <header> is defined to contain heading elements, namely <h1> and even <h2>, <h3>, etc., Also, if necessary, there can be more than one <header> on a single page! Maybe confusing for humans, not so for computers.

So, I went a head and added <banner> to the above declarations, and added some styles to the <banner> 

The page markup now looked like this… but when displayed in a browser, the <banner> was no where to be seen, not at all visible, it was dead….  Try it and see for yourself (just cut and paste)

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>A Very Basic HTML5 Web Page</title>
<style type="text/css" media="screen">
html, body, div, banner, header, footer, aside, nav, article, section, { margin: 0; padding: 0; }
banner, header, footer, aside, nav, article, section { display: block; }

#wrapper {width: 960px;
height: 768px;
background-color: #ddd;
margin: 0 auto;
banner {width: 960px;
height: 160px;
background-color: yellow; }

banner { width: 960px;
              height:150px;
back-ground-color: yellow;}

</style>
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
</head>

<body>
<div id="wrapper">

<banner>

<h1>An h1 heading for our web page</h1>
<h2>A slug line for our banner</h2> 

</banner>

</div> <!-- Comment:   closing div for the wrapper --> 

</body>

</html>

As, you can see the <banner> , does not show up in a browser, it's gone, missing, it's dead!

In html5 the parts or divisions of the layout on a web page are well defined. Html5 uses a very precise language called semantics to describe the various parts of the layout.

Semantics, definition: the meaning, or an interpretation of the meaning of a word… 

One of the reasons for using well defined words is so that a computer (not humans?) can find a "section," an  "article" or the "header" on any web page easily and quickly…

The well defined words for html5 layout are:  header, footer, aside, nav, article, section

In our markup above, if you replace <banner> with <header> The header for our web page will display in all browsers just fine.

It was Sematics that killed the <banner>!
Using html5's well defined words, well,  puts us all on the same page...

To learn more about the sematics for header, footer, aside, nav, article, and section read this document. (It's also on your class disk.)

There are many articles written about the html5 semantics, just do a Google search using the phrase
html5 semantics

Today the sun is shinning on our web pages, even though it's raining outside, again, in dreary Vancouver, WA

Thursday, October 27, 2011

Week 4 -Outline and Resources

Week 4 Outline

 

CLASS #4 Notes:
“Don't make it hard for your clients
to contact you" --anon

 

Building a banner, positioning content, menu layout and contact forms.

Subjects
  1. Banner -Inserting backgrounds, images.
  2. TRouBLe --Position Rules
  3. Menus/navigation
  4. Layout
  5. Contact Forms! (Next week)

Objective

To build a web site consisting of at least 3 web pages.

This week

  • Banner -Inserting backgrounds, images.
  • Menus/navigation
  • Layout TRouBLe --Using the Position Rules

How! Web Page Creation Preparation for Week 4

Resources for this week -- go to these URL's

The Banner Tutorial -images & backgrounds and html5
The Banner Tutorials

Generating Menus
The Menu Tutorials
The List-o-matic menu generator
List-o-matic

Layout
Using the Position Rules
Try some simple layouts

Homework

  1. Generate a menu, and insert on your web page
  2. Finish the layout of your "home" (index.html) web page
  3. Duplicate your index.html web page 3 times... and re-name them Contact.html, About.html, Product.html
  4. Read all about Contact e-mails and Contact Forms!
    The Contact Form Tutorial

Navigation Here

On-Line and desktop References for html and CSS

CSS at Sitepoint.com

HTML at Sitepoint.com

Sitepoint also offers a "plug-in called Code Burner, it's a quick interface that resides on your desktop or in your FireFox Browser. It is linked to the Sitepoint on-line references for CSS and HTML. Check out Code Burner!

Graphically Challenged?

The Cool Text web site will help you design a logo. The Cool Text Wizard

Thursday, October 20, 2011

Week 3 Review -The Box Model and Basic CSS

Week 3 Outline



CLASS #3 Notes:
“People don't read web pages,
they scan them!" --anon

 

The Box Model. Div's and CSS

Subjects
  1. The Box Model
  2. Div's
  3. CSS, some simple rules
  4. How to Make a Banner/Header

 

Objective

To build a web site consisting of at least 3 web pages.

This week

  • How to use the <div></div> element. The Box Model
  • Styling with CSS

How! Web Page Creation Preparation for Week 3

Resources for this week -- go to these URL's

The Box Model
http://uofgts.com/BasicWD/BoxModel.html

Basic CSS Rules
http://uofgts.com/BasicWD/CSSRules.html


Homework

Work through the Banner Tutorials


Navigation Here

 


On-Line and desktop References for html and CSS

CSS at Sitepoint.com

HTML at Sitepoint.com

Sitepoint also offers a "plug-in called Code Burner, it's a quick interface that resides on your desktop or in your FireFox Browser. It is linked to the sitepoint on-line references for CSS and HTML. Check out Code Burner!


Graphically Challenged?

The Cool Text web site will help you design a logo. The Cool Text Wizard

Thursday, April 29, 2010

Create A Web Site - Week 3 Making a Banner

Making a Banner
I put together a 7 step tutorial that takes you through the steps of making a styled banner
starting with text, then xhtml markup, then adding the CSS styling (embedded).

Files needed...
1. A background gradient or image
2. A logo...

You'll find page 1 here

On pages 2 - 7

on the left hand side of the page is what the markup looks like in a text editor
On the right hand side is what the markup looks like in a web editor...

Got a question? 'Holler as usual...