Website Design
Website Design
0 WEBSITE DESIGN
19.1 Introduction
A website, also written as Web site, web site, or simply site, is a set of related web pages containing content such
as text, images, video, audio, etc. A website is hosted on at least one web server, accessible via a network such as
the Internet or a private local area network through an Internet address known as a Uniform Resource Locator. All
publicly accessible websites collectively constitute the World Wide Web.A webpage is a document, typically
written in plain text interspersed with formatting instructions of Hypertext Markup Language (HTML, XHTML). A
webpage may incorporate elements from other websites with suitable markup anchors.
Webpages are accessed and transported with the Hypertext Transfer Protocol (HTTP), which may optionally employ
encryption (HTTP Secure, HTTPS) to provide security and privacy for the user of the webpage content. The user's
application, often a web browser, renders the page content according to its HTML markup instructions onto a
display terminal.The pages of a website can usually be accessed from a simple Uniform Resource Locator (URL)
called the web address. The URLs of the pages organize them into a hierarchy, although hyperlinking between them
conveys the reader's perceived site structure and guides the reader's navigation of the site which generally includes a
home page with most of the links to the site's web content, and a supplementary about, contact and link page.
Web design is a broad term covering many different skills and disciplines that are used in the production and
maintenance of websites. The different areas of web design include; web graphic design, interface design, authoring;
including standardized code and proprietary software, user experience design and search engine optimization
The four major design principles include: contrast, repetition, alignment, and proximity.
Contrast
Great contrast can leave a very good first impression on a user. Without a focal point, the viewer is generally lost in
a sea of equally-sized elements and typography. Its the designers job to create visual elements of significance
that guide the users experience. You can achieve great contrast on your site by choosing your images, colors and
fonts wisely.
Repetition
Repetition in print design is much more common than it is in web design; however it can be equally effective.
Repeating design elements helps create a consistent look and improves branding. In web design a great way to
achieve this is by repeating elements in the header and footer. Check out an example below.
Alignment
Alignment plays an intricate role in taking your site designs from looking amateur to professional. Ive recently
become a huge advocate for designing sites using a grid. Doing so cleans up your designs and gives you an awesome
framework to work from.
Proximity
The last principle is proximity. This has to do with grouping like elements together and separating those that are not.
It can really ruin user experience if you group everything into one lump text block. Thats why its very important to
use header tags and proper spacing.
Essential Factors to Consider When Designing a Website
The first thing we notice when we come across anything is the ambiance that is why the design of a web page is so
important. From the beginning, web design trends have evolved and followed changes in technology and
consumerism.
Gadgets like iPhones, iPods, touch screen cell phones and note books are some of the highlights of the fast
development in this world. Social websites are the new trend in the world of web design. People have higher
demands and shorter attention spans, in order for a site to be effective it either has to be, or at least appear, effortless
and usable. Along with these rapid developments, the essence of web designing is also groomed.
Psychological Effect
Its very easy to find information of almost any kind on the internet. According to psychological studies, humans
naturally accept those thing that are relevant to their real life, rather than fantastical or imaginary things. Based on
this theory, the following points should be kept in mind when designing websites.
Simplicity
Some scholars say the difference between a successful and an unsuccessful website lies in its simplicity.Design is
done for a reason, and if you do it well it will prosper. If you do it poorly, people will leave your website.Here are
some good examples of websites that showcase usability:
KISS- Keep It Simple, Smart! Or Keep It Simple and Straightforward is at the core of a lot of great design.
1. There are many benefits of the use of Web. Different types of organizations use the Web for different
purposes.
2. The major benefits of Internet web sites are:
3. A manufacturer provides you the information about its products, prices and where they are available for
sale.
5. An airport provides you the latest information about flights arriving and / or leaving the airport.
6. A television station provides you the information about its programs, the latest news etc.
8. An encyclopedia publisher provides on-line facility to access or search any information on any topic in the
world.
9. The weather forecasting departments of each country provide the latest forecasts of their countries.
10. A writer (author) provides you a list of his books, which are published or in print.
11. Film Actors/Actresses and sportsmen provide their introduction with pictures.
12. Search engines provide you a facility to search different information or other sites on the Internet.
13. Medical sites on the Internet provide information about diseases. These sites also let you consult a panel of
doctors on-line who will advise you about any medical problem.
14. Online education web sites who taught about technology like free-computer-tips.info
HTML stands for HyperText Markup Language, which is developed based on the SGML (Standard Generalized
Markup Language). More information concerning HTML and SGML can be obtained from the World Wide Web
Consortium (W3C).
HTML uses tags to "mark" certain text with a particular behavior. For the example statement below,
The <B>and </B> tags mark the enclosed text (i.e., This is bold text) as bold type.
There are two basic types of HTML Tags: containers and empty tags.
Containers have an opening tag (e.g., the <B> tag) and a closing tag (e.g., the </B> tag). Usually, the closing tag
has the same keyword as the opening tag, but starts with a back slash '/'.
Empty tags consist of a single tag only (e.g., the <BR> tag).
The first tag in a pair is the start tag, the second tag is the end tag
Start and end tags are also called opening tags and closing tags
The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and display them as
web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page:
<html>
<body>
</body>
</html>
Example Explained
The text between <html> and </html> describes the web page
The text between <body> and </body> is the visible page content
HTML can be written and edited using many different editors like Dreamweaver and Visual Studio.
However, in this tutorial we use a plain text editor (like Notepad) to edit HTML. We believe using a plain text editor
is the best way to learn HTML.
When you save an HTML file, you can use either the .htm or the .html file extension. There is no difference; it is
entirely up to you.
HTML Headings
<h1> defines the most important heading. <h6> defines the least important heading.
Example
< h1>This is a heading</h1>
< h2>This is a heading</h2>
< h3>This is a heading</h3>
Note: Browsers automatically add some empty space (a margin) before and after each heading.
Use HTML headings for headings only. Don't use headings to make text BIG or bold.
Search engines use your headings to index the structure and content of your web pages.
Since users may skim your pages by its headings, it is important to use headings to show the document structure.
H1 headings should be used as main headings, followed by H2 headings, then the less important H3 headings, and
so on.
HTML Paragraphs
Example
The <hr /> tag creates a horizontal line in an HTML page. The hr element can be used to separate content:
Example
Example
HTML Images
Example
HTML Elements
An HTML element is everything from the start tag to the end tag:
* The start tag is often called the opening tag. The end tag is often called the closing tag.
The element content is everything between the start and the end tag
Most HTML elements can be nested (can contain other HTML elements).
< html>
< body>
< p>This is my first paragraph.</p>
< /body>
< /html>
< body>
< p>This is my first paragraph.</p>
< /body>
< html>
< body>
< p>This is my first paragraph.</p>
< /body>
< /html>
Some HTML elements might display correctly even if you forget the end tag:
The example above works in most browsers, because the closing tag is considered optional.
Many HTML elements will produce unexpected results and/or errors if you forget the end tag.
<br> is an empty element without a closing tag (the <br> tag defines a line break).
In XHTML, all elements must be closed. Adding a slash inside the start tag, like <br />, is the proper way of closing
empty elements in XHTML (and XML).
HTML tags are not case sensitive: <P> means the same as <p>. Many web sites use uppercase HTML tags.
HTML Attributes
HTML elements can have attributes. Attributes provide additional information about an element.
Attribute Example
HTML links are defined with the <a> tag. The link address is specified in the href attribute:
Example
Double style quotes are the most common, but single style quotes are also allowed.
In some rare situations, when the attribute value itself contains quotes, it is necessary to use single quotes:
name='John "ShotGun" Nelson'
A complete list of legal attributes for each HTML element is listed in our:
Below is a list of some attributes that are standard for most HTML elements:
Comments can be inserted into the HTML code to make it more readable and understandable. Comments are
ignored by the browser and are not displayed.
Example
Note: There is an exclamation point after the opening bracket, but not before the closing bracket.
To find out, right-click in the page and select "View Source" (IE) or "View Page Source" (Firefox), or similar for
other browsers. This will open a window containing the HTML code of the page.
Tag Description
<html> Defines an HTML document
<body> Defines the document's body
<h1> to <h6> Defines HTML headings
<hr /> Defines a horizontal line
<!--> Defines a comment
HTML Paragraphs
HTML documents are divided into paragraphs. Paragraphs are defined with the <p> tag.
Example
Example
The example above will work in most browsers, but don't rely on it. Forgetting the end tag can produce unexpected
results or errors.
Note: Future version of HTML will not allow you to skip end tags.
Use the <br /> tag if you want a line break (a new line) without starting a new paragraph:
Example
The <br /> element is an empty HTML element. It has no end tag.
In XHTML, XML, elements with no end tag (closing tag) are not allowed.
Even if <br> works in all browsers, writing <br /> instead works better in XHTML and XML applications.
HTML Output
You cannot be sure how HTML will be displayed. Large or small screens and resized windows will create different
results.
With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code.
The browser will remove extra spaces and extra lines when the page is displayed. Any number of lines counts as one
line, and any number of spaces count as one space.
W3Schools' tag reference contains additional information about HTML elements and their attributes.
Tag Description
HTML uses tags like <b> and <i> for formatting output, like bold or italictext.
These HTML tags are called formatting tags (look at the bottom of this page for a complete reference).
< strong> or <em> means that you want the text to be rendered in a way that the user understands as "important".
Today, all major browsers render strong as bold and em as italics. However, if a browser one day wants to make a
text highlighted with the strong feature, it might be cursive for example and not bold!
Tag Description
Tag Description
Tag Description
The World Wide Web Consortium (W3C) has removed the <font> tag from its recommendations.
In HTML 4, style sheets (CSS) should be used to define the layout and display properties for many HTML elements.
The example below shows how the HTML could look by using the <font> tag:
Example
< p>
< font size="5" face="arial" color="red">
This paragraph is in Arial, size 5, and in red text color.
< /font>
< /p>
< p>
< font size="3" face="verdana" color="blue">
This paragraph is in Verdana, size 3, and in blue text color.
< /font>
< /p>
Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into
data cells (with the <td> tag). td stands for "table data," and holds the content of a data cell. A <td> tag can contain
text, links, images, lists, forms, other tables, etc.
Table Example
If you do not specify a border attribute, the table will be displayed without borders. Sometimes this can be useful,
but most of the time, we want the borders to show.
To display a table with borders, specify the border attribute:
All major browsers display the text in the <th> element as bold and centered.
Header 1 Header 2
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2
HTML Table Tags caption
Tag Description
<table> Defines a table
<th> Defines a table header
<tr> Defines a table row
<td> Defines a table cell
<caption> Defines a table caption
<colgroup> Defines a group of columns in a table, for formatting
<col /> Defines attribute values for one or more columns in a table
<thead> Groups the header content in a table
<tbody> Groups the body content in a table
<tfoot> Groups the footer content in a table
19.2.8 HTML Lists
The most common HTML lists are ordered and unordered lists:
An ordered list: An unordered list:
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
The list items are marked with bullets (typically small black circles).
< ul>
< li>Coffee</li>
< li>Milk</li>
< /ul>
Coffee
Milk
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
< ol>
< li>Coffee</li>
< li>Milk</li>
< /ol>
Coffee
Milk
The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list):
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
Coffee
Milk
Tag Description
<ol> Defines an ordered list
<ul> Defines an unordered list
<li> Defines a list item
<dl> Defines a definition list
<dt> Defines an item in a definition list
<dd> Defines a description of an item in a definition list
HTML <div> and <span>
Most HTML elements are defined as block level elements or asinline elements.
Block level elements normally start (and end) with a new line when displayed in a browser.
The HTML <div> element is a block level element that can be used as a container for grouping other HTML
elements.
The <div> element has no special meaning. Except that, because it is a block level element, the browser will display
a line break before and after it.
When used together with CSS, the <div> element can be used to set style attributes to large blocks of content.
Another common use of the <div> element, is for document layout. It replaces the "old way" of defining layout
using tables. Using tables is not the correct use of the <table> element. The purpose of the <table> element is to
display tabular data.
The HTML <span> element is an inline element that can be used as a container for text.
When used together with CSS, the <span> element can be used to set style attributes to parts of the text.
Tag Description
Web page layout is very important to make your website look good.
Most websites have put their content in multiple columns (formatted like a magazine or newspaper).
Multiple columns are created by using <div> or <table> elements. CSS are used to position elements, or to create
backgrounds or colorful look for the pages.
The div element is a block level element used for grouping HTML elements.
The following example uses five div elements to create a multiple column layout, creating the same result as in the
previous example:
Example
<!DOCTYPE html>
<html>
<body>
<div id="container" style="width:500px">
<div id="header" style="background-color:#FFA500;">
<h1 style="margin-bottom:0;">Main Title of Web Page</h1></div>
<div id="menu" style="background-color:#FFD700;height:200px;width:100px;float:left;">
< b>Menu</b><br />
HTML<br />
CSS<br />
JavaScript</div>
< /div>
< /body>
< /html>
HTML Layouts - Using Tables
A simple way of creating layouts is by using the HTML <table> tag. Multiple columns are created by using <div> or
<table> elements. CSS are used to position elements, or to create backgrounds or colorful look for the pages.
The following example uses a table with 3 rows and 2 columns - the first and last row spans both columns using the
colspan attribute:
Example
<!DOCTYPE html>
<html>
<body>
<tr valign="top">
<td style="background-color:#FFD700;width:100px;text-align:top;">
<b>Menu</b><br/>
HTML<br />
CSS<br />
JavaScript
</td>
<td style="background-color:#EEEEEE;height:200px;width:400px;text-align:top;">
Content goes here</td>
</tr>
<tr>
<td colspan="2" style="background-color:#FFA500;text-align:center;">
Copyright © W3Schools.com</td>
</tr>
</table>
</body>
</html>
The biggest advantage of using CSS is that, if you place the CSS code in an external style sheet, your site becomes
MUCH EASIER to maintain. You can change the layout of all your pages by editing one file.
Because advanced layouts take time to create, a quicker option is to use a template. Templates are pre-built website
layouts you can use and customize.
Tag Description
<div> Defines a section in a document
<span> Defines a section in a document
19.3.1 HTML Forms
A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can
also contain select lists, text area, fieldset, legend, and label elements.
< form>
.
input elements
.
< /form>
HTML Forms - The Input Element
An input element can vary in many ways, depending on the type attribute. An input element can be of type text field,
checkbox, password, radio button, submit button, and more.
Text Fields
<input type="text" /> defines a one-line input field that a user can enter text into:
< form>
First name:< input type="text" name="firstname" /><br />
Last name:< input type="text" name="lastname" />
< /form>
First name:
Last name:
Note: The form itself is not visible. Also note that the default width of a text field is 20 characters.
Password Field
<input type="password" /> defines a password field:
< form>
Password:< input type="password" name="pwd" />
< /form>
Password:
Note: The characters in a password field are masked (shown as asterisks or circles).
Radio Buttons
<input type="radio" /> defines a radio button. Radio buttons let a user select ONLY ONE of a limited number of
choices:
< form>
< input type="radio" name="sex" value="male" /> Male<br />
< input type="radio" name="sex" value="female" /> Female
< /form>
Male
Female
Checkboxes
<input type="checkbox" /> defines a checkbox. Checkboxes let a user select ONE or MORE options of a limited
number of choices.
< form>
< input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br />
< input type="checkbox" name="vehicle" value="Car" /> I have a car
< /form>
I have a bike
I have a car
Submit Button
A submit button is used to send form data to a server. The data is sent to the page specified in the form's action
attribute. The file defined in the action attribute usually does something with the received input:
< form name="input" action="html_form_action.asp" method="get">
Username:< input type="text" name="user" />
< input type="submit" value="Submit" />
< /form>
Submit
Username:
If you type some characters in the text field above, and click the "Submit" button, the browser will send your input
to a page called "html_form_action.asp". The page will show you the received input.
Tag Description
<form> Defines an HTML form for user input
<input /> Defines an input control
<textarea> Defines a multi-line text input control
<label> Defines a label for an input element
<fieldset> Defines a border around elements in a form
<legend> Defines a caption for a fieldset element
<select> Defines a select list (drop-down list)
<optgroup> Defines a group of related options in a select list
<option> Defines an option in a select list
<button> Defines a push button
The height and width attributes are used to specify the height and width of the iframe.
The attribute values are specified in pixels by default, but they can also be in percent (like "80%").
Example
The frameborder attribute specifies whether or not to display a border around the iframe.
Set the attribute value to "0" to remove the border:
Example
An iframe can be used as the target frame for a link. The target attribute of a link must refer to the name attribute of
the iframe:
Example
Tag Description
<iframe> Defines an inline sub window (frame)
Color Values
HTML colors are defined using a hexadecimal notation (HEX) for the combination of Red, Green, and Blue color
values (RGB).
The lowest value that can be given to one of the light sources is 0 (in HEX: 00). The highest value is 255 (in HEX:
FF).
HEX values are specified as 3 pairs of two-digit numbers, starting with a # sign.
Color Values
#000000 rgb(0,0,0)
#FF0000 rgb(255,0,0)
#00FF00 rgb(0,255,0)
#0000FF rgb(0,0,255)
#FFFF00 rgb(255,255,0)
#00FFFF rgb(0,255,255)
Color Color HEX Color RGB
#FF00FF rgb(255,0,255)
#C0C0C0 rgb(192,192,192)
#FFFFFF rgb(255,255,255)