Principles of Web Development: Creating A Professional Website
Principles of Web Development: Creating A Professional Website
Principles of Web Development: Creating A Professional Website
Submitted By:
Pratik Raj
(BFT/17/548)
Declaration
“This is to certify that this document work of creating a web page ‘Iron
Maiden’ is based on the original research work of Pratik Raj conducted
under the guidance of Mr. Neeraj Kumar towards partial fulfilment of
curriculum of the subject- Principles of Web Development.
Pratik Raj
Lastly, i take the opportunity to thank all the people who guided us
through the entire process, our faculties at NIFT and fellow students who
have imparted the necessary knowledge and skills that I required to
complete this document.
Pratik Raj
Assignment Brief
Datatypes in JavaScript
JavaScript is dynamically typed (also called loosely typed) scripting
language. That is, in JavaScript variables can receive different data types
over time. Datatypes are basically typed of data that can be used and
manipulated in a program. A variable in JavaScript can contain any data.
This means that a variable at one time can be a number and at another
be a string.
The latest ECMAScript(ES6) standard defines seven data types: Out of
which six data types are Primitive(predefined).
Numbers: 5, 6.5, 7 etc.
String: “Hello world” etc.
Boolean: Represent a logical entity and can have two values: true or
false.
Null: This type has only one value : null.
Undefined: A variable that has not been assigned a value is undefined.
Object: It is the most important data-type and forms the building
blocks for modern JavaScript. We will learn about these data types in
details in further articles.
Number
The number type in JavaScript contains both integer and floating point
numbers. Besides these numbers, we also have some ‘special-numbers’
in JavaScript that are: ‘Infinity’, ‘-Infinity’ and ‘NaN’. The Infinity basically
represents the mathematical ‘?’. The ‘NaN’ denotes a computational
error.
let num = 2; // integer
let num2 = 1.3; // floating point number
let num3 = Infinity; // Infinity
let num4 = 'something here too'/2; // NaN
String
A String in JavaScript is basically a series of characters that are
surrounded by quotes. There are three types of quotes in JavaScript,
which are:
let str = "Hello There";
let str2 = 'Single quotes works fine';
let phrase = `can embed ${str}`;
There’s no difference between ‘single’ and “double” quotes in JavaScript.
Backticks provide extra functionality as with the help of them we can
embed variables inside them.
A Boolean
The Boolean type has only two values: true and false.
This data type is used to store yes/no values: true means “yes, correct”,
and false means “no, incorrect”.
let isCoding = true; // yes
let isOld = false; // no
A null
The special null value does not belong to any of the default data types. It
forms a separate type of its own which contains only the null value:
let age = null;
The ‘null’ data type basically defines a special value which represents
‘nothing’, ’empty’ or ‘value unknown’.
Undefined
Just like null, Undefined makes its own type. The meaning of undefined is
‘value is not assigned’.
let x;
console.log(x); // undefined
Object
Objects are not primitive in nature and a bit complex to understand.
Everything in JavaScript is basically an object, and that is the reason why
it becomes very important to have a good understanding of what they
are. Objects are used to store keyed collections of various data and more
complex entities.
We can create objects in multiple ways. One is by making use of figure
brackets {…} with an optional list of properties. The properties of an
object are in the form of ‘key: value’ pair. Another way is to make use of
the ‘new’ keyword.
An empty Object can be created using given below syntax.
let person = new Object(); // "object constructor" syntax
let person = {}; // "object literal" syntax
Conditional Statements
Very often when you write code, you want to perform different actions
for different decisions.
You can use conditional statements in your code to do this.
In JavaScript we have the following conditional statements:
Use if to specify a block of code to be executed, if a specified
condition is true
Use else to specify a block of code to be executed, if the same
condition is false
Use else if to specify a new condition to test, if the first condition
is false
Use switch to specify many alternative blocks of code to be
executed
<html>
<head>
<style>
table, th, td {border: 1px solid black;}
</style>
</head>
<body>
<table style="width:100%">
<tr style="background-color:yellowgreen;color:white;">
<tr bgcolor="pink">
<th>name</th>
<th>maths</th>
<th>science</th>
<th>english</th>
</tr>
<tr>
<td bgcolor="yellow">Sunil</td>
<td>60</td>
<td>70</td>
<td>80</td>
</tr>
<tr>
<td bgcolor="yellow">amit</td>
<td>70</td>
<td>60</td>
<td>75</td>
</tr>
<tr>
<td bgcolor="yellow">shweta</td>
<td>60</td>
<td>65</td>
<td>70</td>
</tr>
<tr>
<td bgcolor="yellow">rohan</td>
<td>80</td>
<td>75</td>
<td>70</td>
</table>
</tr>
TASK-2(Output)
<html>
<head>
<body background = "IoT-arch.png">
<title>Text Input Control</title>
</head>
<body>
<form >
First name: <input type = "text" name = "first_name" />
<br>
Last name: <input type = "text" name = "last_name" />
</form>
<head>
<title>Password Input Control</title>
</head>
<form >
User ID : <input type = "text" name = "user_id" />
<br>
Password: <input type = "password" name = "password" />
</form>
<td>Phone:</td>
<td><input type='text' name='name'></td></tr>
<tr> <td> </td></tr>
<td>Email:</td>
<td><input type='text' name='name'></td></tr>
<h2> gender </h2>
<form>
<input type="radio" name="gender"
value="male" checked> male<br>
<input type="radio" name="gender"
value="female">female<br>
<input type="radio" name="gender"
value="other"> other
</from>
<form>
<input type="submit" value="sign in">
<a href="table.html"> my link text</a>
</form>
</body>
</html>
TASK-3(Output)
CODE:1
<a href="table.html"> my link text</a>
CODE:2
<a href="register_page.html"> my home page </a>
CODE:1 was used in the application form html code (TASK-3) so that it
can be linked to the html code for creating the table (TASK-2) and
CODE:2 was used in the html code for creating the table so that it can go
back to the my home page (the application/register form page).
TAGS DESCRIPTION
2. Simplicity
Simplicity is the best way to go when considering the user experience and
the usability of your website. Below are ways to achieve simplicity
through design.
Colour
Colour has the power to communicate messages and evoke emotional
responses. Finding a colour palette that fits your brand will allow you to
influence your customer’s behaviour towards your brand. Keep the
colour selection limited to less than 5 colours. Complementary colours
work very well. Pleasing colour combinations increase customer
engagement and make the user feel good.
Type
Typography has an important role to play on your website. It commands
attention and works as the visual interpretation of the brands voice.
Typefaces should be legible and only use a maximum of 3 different fonts
on the website.
Imagery
Imagery is every visual aspect used within communications. This includes
still photography, illustration, video and all forms of graphics. All imagery
should be expressive and capture the spirit of the company and act as the
embodiment of their brand personality. Most of the initial information
we consume on websites is visual and as a first impression it is important
that high quality images are used to form an impression of
professionalism and credibility in the visitors mind.
3. Navigation
The F- based pattern is the most common way visitors scan text on a
website. Eye tracking studies have found that most of what people see is
in the top and left area of the screen. The F’ shaped layout mimics our
natural pattern of reading in the West (left to right and top to bottom).
An effective designed website will work with a readers natural pattern of
scanning the page.
5. Visual Hierarchy
6. Content
An effective web design has both great design and great content. Using
compelling language great content can attract and influence visitors by
converting them into customers.
7. Grid based layout
Grids help to structure your design and keep your content organised. The
grid helps to align elements on the page and keep it clean. The grid based
layout arranges content into a clean rigid grid structure with columns,
sections that line up and feel balanced and impose order and results in an
aesthetically pleasing website.
8. Load Time
Waiting for a website to load will lose visitors. Nearly half of web visitors
expect a site to load in 2 seconds or less and they will potentially leave a
site that isn’t loaded within 3 seconds. Optimising image sizes will help
load your site faster.
9. Mobile Friendly
More people are using their phones or other devices to browse the web.
It is important to consider building your website with a responsive layout
where your website can adjust to different screens.
Website Page:
1. Home Page
2. About Us Page
3. Register here Page