Internet Application and Application
Internet Application and Application
REG NO : CIS-0268-1-2020
Cyber Predators -These days sexual and other predators often stalk children on the
internet, taking advantage of their innocence, lack of adult supervision and abusing their
trust. The best protection is regularly talking to your children about what is going on in
their day-to-day lives.
Phishing is what cyber security professionals call the use of emails that try to trick people
into clicking on malicious links or attachments. Avoid clicking on emails or texts from
strangers and to be wary of messages that appear to be from their friends but seem “off”
or have no genuine personal message attached.
Accidentally Downloading Malware- Malware is computer software that is installed
without the knowledge of permission of the victim and performs harmful actions on the
computer. Buy a security protection can help safeguard your computer against any
malware that sneaks into it
4 Distinguish among CSS tag, class and id selectors. Show how you define and apply on a
webpage. [2 marks]
An internal CSS is defined in the <head> section of an HTML page, within a <style>
element. The following example sets the text color of ALL the <h1> elements (on that
page) to blue, and the text color of ALL the <p> elements to red.
ii) Steve wishes to create CSS file which contains styles for his website. Describe how
you help Steve accomplish this task by defining at least three styles using tag, class
and id selector. Further show how you link to web pages and apply to the pages.
[3 marks]
You can link this external file (. Css file) to your HTML document file using the < link >
tag. You can place this < link > tag Within the < head > section, and after the < title >
element of your HTML file. The value of the rel attribute must be style sheet. Example;
<html>
<head>
<title>Example</title>
<link rel=”stylesheet” type=”text/css” href=”styles.css” />
</head>
<body>
<h1>Embedded Style Sample testing</h1>
<h2>Next Line</h2>
</body>
</html>
Allows dynamic content to get execute in a webpage. JavaScript can make the website
more interactive and user- friendliness of JavaScript helps easy navigation of the website
and helps designers to guide the visitors with additional information or guide them
through walkthroughs. Visual effects can also be achieved with JavaScript. JavaScript
can be used effectively to create special effects like rollover for images.
b) Show how you can use JavaScript to validate form entries. [3 marks]
If a form field (fname) is empty, this function alerts a message, and returns false, to
prevent the form from being submitted:
Example
<form name=”myForm” action=”/action_page.php” onsubmit=”return validateForm()”
method=”post”>
Name: <input type=”text” name=”fname”>
<input type=”submit” value=”Submit”>
</form>
It is highly recommended that one should have at least a basic working knowledge of
HTML and CSS.
b) Write a simple php that prints some text if someone is above18 years and a different
text if below. [2 marks]
<!DOCTYPE html>
<html>
<body
<?php
Echo “ someone is above18 years ”;
?>
</body>
</html>
c) Enter some text through a form text box, Using php dbx commands post the text to a
database and retrieve to print on the screen. [3 marks]