Professional Documents
Culture Documents
CSC2514 - Rakshya Nepali
CSC2514 - Rakshya Nepali
Semester: Fourth
b. Visual hierarchy
Visual hierarchy is the order or sequence in which our eye moves and
perceives the things it sees. When it comes to a web page, the visual
hierarchy can be referred to the sequence in which our eye moves from
one topic/content/block to another. When designing a web page, a
designer first needs to identify the order of importance of the various
topics and then place them in such a way that the visitors first view
what is most important and then move onto the others in a hierarchical
manner.
c. Accessibility
When a visitor enters the website, he/she must be able to access each
bit of information in the easiest manner. This means that the text must
be legible, the colors must not be harsh on the eyes and the background
must not overpower the content, etc.
d. Hick’s law
Hick’s law states that ‘with every additional choice increases the time
required to take a decision.‘This law does not only hold true for web
design but also in a number of other situations and settings. As far as
web designing is concerned, the more options you offer to your
visitors, the more difficult the website will become to use and browse
through. This means that we need to reduce the number of choices in
order to provide a better user experience. Distracting options have to
be eliminated to aid increased sales and better overall profit. Hick’s
law can also be translated to ‘More options mean less sales’.
e. Fitt’s Law
Fitt’s law states that ‘the time needed to move to a target is dependent
upon the size of the target as well as the distance to the target.
‘However, this does not mean that the bigger, the better but means that
the usability factor of a target runs as a curve and not as a straight line.
When you apply this law to your web design, then users may be more
motivated and encouraged to press the button that you want them to
press.
2.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
if($_SERVER['REQUEST_METHOD']=='POST')
{
$num = $_POST['num'];
echo "<h3> Result obtained: </h3>";
if($num>=70){
echo"DISTINCTION";
}
elseif($num>=60 && $num<=69){
echo "First Division";
}
elseif($num>=50 && $num <=59){
echo "second divaision";
}
else{
echo"fail";
}
}
?>
<form action="<?php htmlspecialchars($_SERVER['PHP_SELF']);?>"
method="POST">
<p>Enter percentage of marks obtain:</p>
<input type="number" name="num">
<input type="submit">
</form>
</body>
</html>
OUTPUT
3.
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Form
</title>
<style>
th,
td {
text-align: left;
font-size: 23px;
font-family: 'Times New Roman', Times, serif;
padding-bottom: 10px;
}
td input,
td select {
font-size: 20px;
}
</style>
<body>
<?php
$_target_dir = 'uploads/';
if ($_SERVER['REQUEST_METHOD'] == 'POST' and
isset($_POST['submit'])) {
$name = $_POST['name'];
$price = $_POST['price'];
?>
<tr>
<th>
<label>
Photo :
</label>
<td>
<input type="file" name='fileToUpload' value="fileToUpload">
</td>
</th>
</tr>
<tr>
<th>
</th>
<td>
<input type="submit" name="submit" >
</td>
</tr>
<?php
?>
</body>
</head>
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Form
</title>
<style>
table, th,
td {
text-align: left;
font-size: 23px;
font-family: 'Times New Roman', Times, serif;
padding-bottom: 10px;
border: 1px solid black;
border-collapse: collapse;
}
td input,
td select {
font-size: 20px;
}
</style>
<body>
<?php
$server = "localhost";
$username = "root";
$password = "";
$db = "exam";
$conn = new mysqli($server, $username, $password, $db);
if ($conn->connect_error) {
die("connection aborted");
} else
{
// echo "connection established<br>";
<tr>
<th>
photo
</th>
<th>Name
</th>
<th>
Price
</th>
</tr>
";
echo "<tr>";
?>
OUTPUT