HTML

HTML

Structure

HTMLex

HTMLex

HTMLex

HTMLex

-Attributes provide additional information about the contents of an element. They appear on the opening tag of the element and are made up of two parts: a name and a value, separated by an equals sign.

HTMLex

Body, Head & Title

Everything inside this element is shown inside the main browser window.

Before the body element you will often see a head element. This contains information about the page, you will usually find a title element inside the head element.

The contents of the title element are either shown in the top of the browser, above where you usually type in the URL of the page you want to visit, or on the tab for that page (if your browser uses tabs to allow you to view multiple pages at the same time).

Extra Markup

Looking at How Other sites are Built

DOCTYPEs

Because there have been several versions of HTML, each web page should begin with a DOCTYPE declaration to tell a browser which version of HTML the page is using.

IDs And CLASSES

The id is used to uniquely identify that element from other elements on the page. Its value should start with a letter or an underscore (not a number or any other character).

Every HTML element can also carry a class attribute. Sometimes, rather than uniquely identifying one element within a document, you will want a way to identify several elements as being different from the other elements on the page.

THE DIV TAG

 <div> </div>

The div element allows you to group a set of elements together in one block-level box.

THE META TAG

The meta element lives inside the head element and contains information about that web page.

The header and footer elements can be used for:

  1. The main header or footer that appears at the top or bottom of every page on the site.

The nav element is used to contain the major navigational blocks on the site such as the primary site navigation.

HTML5 Layout

HTML

Traditional HTML Layouts

-For a long time, web page authors used div elements to group together related elements on the page (such as the elements that form a header, an article, footer or sidebar). Authors used class or id attributes to indicate the role of the div element in the structure of the page.

HTML

  1. At the top of the page is the header, containing a logo and the primary navigation.

  2. Under this are one or more articles or posts. Sometimes these are summaries that link to individual posts.

  3. There is a side bar on the right- hand side (perhaps featuring a search option, links to other recent articles, other sections of the site, or even ads).

  4. When coding a site like this, developers would usually put these main sections of the page inside div elements and use the class or id attributes to indicate the purpose of that part of the page.

New HTML5 Layout

html5layout

  1. This example has exactly the same structure as seen on the previous page. However, many of the div elements have been replaced by new HTML5 layout elements.

  2. For example, the header sits inside a new header element, the navigation in a nav element, and the articles are in individual article elements.

  3. The point of creating these new elements is so that web page authors can use them to help describe the structure of the page. For example, screen reader software might allow users to ignore headers and footers and get straight to the content. Similarly, search engines might place more weight on the content in an article element than that in the header or footer elements. I think you will agree that it also makes the code easier to follow.

Articles

The article element acts as a container for any section of a page that could stand alone and potentially be syndicated.

-If a page contains several articles (or even summaries of several articles), then each individual article would live inside its own article element. The article elements can even be nested inside each other.

article

Process and Design

Who is the Site For?

Every website should be designed for the target audience—not just for yourself or the site owner. It is therefore very important to understand who your target audience is.

Target Audience: individuals:

Target Audience: Companies:

What Information Your Visitors Need?

You need to work out what information the visitors need in order to achieve their goals quickly and effectively.

Key Information:

Site Maps

Example 1:

SiteMap 1

Example 2:

SiteMap 2

Wireframes

Example 1:

Wireframe 1

Example 2:

Wireframe 1

Visual hierarchy

Most web users do not read entire pages. Rather, they skim to find information. You can use contrast to create a visual hierarchy that gets across your key message and helps users find what they are looking for.

Visual hierarchy:

It’s the order in which your eyes perceive what they see. It is created by adding visual contrast between the items being displayed. Items with higher contrast are recognized and processed first.

Larger elements will grab users’ attention first. For this reason it is a good idea to make headings and key points relatively large.

Foreground and background color can draw attention to key messages. Brighter sections tend to draw users’ attention first.

An element may be the same size and color as surrounding content but have a different style applied to it to make it stand out.

Designing Navigation

Site navigation not only helps people find where they want to go, but also helps them understand what your site is about and how it is organized. Good navigation tends to follow these principles:

The navigation should be quick and easy to read. It is a good idea to try to limit the number of options in a menu to no more than eight links. These can link to section homepages which in turn link to other pages.

Users should be able to predict the kind of information that they will find on the page before clicking on the link. Where possible, choose single descriptive words for each link rather than phrases.

The primary navigation should only reflect the sections or content of the site. Functions like logins and search, and legal information like terms and conditions and so on are best placed elsewhere on the page.

Good navigation provides context. It lets the user know where they are in the website at that moment. Using a different color or some kind of visual marker to indicate the current page is a good way to do this.

Each link should be big enough to click on and the appearance of the link should change when the user hovers over each item or clicks on it. It should also be visually distinct from other content on the page.

The more pages a site contains, the larger the number of navigation items there will be. Although secondary navigation will change from page to page, it is best to keep the primary navigation exactly the same.

HTML

JavaScript

JavaCroco

What is JavaScript?

JavaScript is a scripting or programming language that allows you to implement complex features on web pages, every time a web page does more than just sit there and display static information for you to look at displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. you can bet that JavaScript is probably involved. It is the third layer of the layer cake of standard web technologies, two of which (HTML and CSS).

Examples of JavaScript is the browser:

  1. Slideshows.
  2. Forms.
  3. Reload part of page.
  4. Filtering data.

The ABC of programing

Scripts

-A script is a series of instructions that a computer can follow to achieve a goal. You could compare scripts to any of the following:

  1. Recipes.
  2. Handbooks.
  3. Manuals.

Scripts Scripts

-Often scripts will need to perform different tasks in different situations. You can use flowcharts to work out how the tasks fit together. The flowcharts show the paths between each step.

Scripts

Scripts

References:

Main page