IT Lab For Grade 10
IT Lab For Grade 10
• Web development is the process of creating websites for various purposes such as information
World Wide Web (www), commonly known as the Web, is one of the most important services of the
Internet.
The Internet is a network of networks that the Web runs on. The Web is just one of the services of the
There are also many other services that are provided over the Internet such as email, file transfer and
communication services.
Con’t,..
• The Web is a collection of websites or webpages that are accessed over the
Internet using a web browser.
• Tim Berners-Lee invented the Web in 1989 in the famous laboratory found in
Switzerland known as CERN.
• When the Web was invented, it was formed out of four essential foundations:
HTML, HTTP, a web server, and a web browser.
• HTML, which stands for HyperText Markup Language, is the language that is
used to create webpages.
•…
A web browser is a software used by users to view webpages.
• HTTP, which stands for HyperText Transfer Protocol, is the set of rules
that web browsers and web servers use to communicate with each
other.
• A website that is physically placed in one part of the world can be accessed from any
• Today, shoppers use websites to make orders of different types of products from their
Cont…
• This avoids the need to physically go to shops, which reduces the cost of transportation and
increases the efficient use of our limited time.
• For example, citizens do not need to go to the Immigration Nationality & Vital Events Agency
• They can simply go to the website and make their requests online.
• Education is another example where websites are used to facilitate a lot of activities. For
resources accessible to students. Online learning has also become widespread in many parts of
Website Design
• Website design is concerned with the plan and design of various aspects of a
website, such as layout, navigation, appearance, and graphics.
• The goal of a website design is to create a website that is appealing to its target
audience.
• The design should also make the search for information easy by providing a well-
organized presentation.
• The following are some important guidelines to consider when a website is designed.
Target Audience
• A website should be designed with the target audience in mind.
• The look and feel, presentation, and all other aspects of the website
should take the target audience of the website into consideration.
• For example, it is recommended not to overcrowd a page with too many graphics.
Web development is the actual creation or building of websites while website design
deals with defining the layout and overall look of the website.
2.1 Web Design and Web Development
• The internet is an amazing thing, with a few touches of a button on your phone or
computer you can send text messages and photos, watch YouTube videos while
lying in your dormitory bed or even video call your friend in despite of where
ever he/she is.
• This ability for computers, and their users, to send and receive information over a
global telecommunication network changed the world we live in forever.
• In early computing days, computers were not connected. However, when
computers became available in different institutions like universities, and low-cost
machines started to show up in many places, It became increasingly necessary to
share data and resources.
• This created the bases of the first computer networks.
…
• computer networks created the ability to share physical resources like printers.
Instead of each computer having its printer, everyone could share one attached
to the network.
• These relatively small networks of close-by computers are called Local Area
Networks (LAN).
• A LAN could be as small as two machines in the same room, or as large as a
university campus with thousands of computers.
• The most famous and successful type of LAN was Ethernet, developed in the
early 1970s and still widely used today.
• In its simplest form, a series of computers are connected to a single, common
Ethernet cable.
…
…
• When a computer wants to transmit data to another computer, it writes the data as an
electric signal, onto the cable.
• Because the cable is shared, every computer plugged into the network sees the
transmission. But the data may not be intended for all of them.
MAC Address
• To solve this problem Ethernet requires that each computer has a unique Media
Access Control Address or MAC address.
• This unique address was added to every data sent over the network.
• So, computers simply listen to the Ethernet cable, and only process data when they
see their address in the header.
• Every computer today comes with its own unique MAC address for both Ethernet
and Wi-Fi. Like 6C-01-E0-CE-6F-67.
• Use the command ipconfig /all to see your computer’s MAC address.
• It is alternatively called a Physical Address.
Collision Domain
• Sending data on the Ethernet cable at the same time creates a collision.
• like two people trying to talk on the phone at the same time (no one will be
able to talk to one another).
• Computers can detect these collisions by listening to the signal on the wire.
• The most obvious solution for a computer to stop transmitting while another
computer is transmitting is, to wait for a few random seconds, and then try
again.
• If the Ethernet cable is still in use it will re-try again after a few random
seconds.
• Even with this method, it is very hard to connect many computers on one
shared ethernet cable.
…
• To reduce collisions and improve efficiency, we need to shrink the number of
devices on any shared Ethernet cable to reduce collisions and improve efficiency
which is called the collision domain.
• The above figure is an example of one collision domain because we have six
computers in one shared cable.
• To reduce the likelihood of collisions, we can break this network into two
collision domains by using a network switch.
• A switch is a networking hardware that connects devices in a computer network
by receiving and forwarding data to the destination place.
…
…
• The switch sits between our two smaller networks and only passes data between
them if necessary.
• It does this by keeping a list of MAC addresses on all sides of the network.
• If computer A wants to transmit to C, the switch doesn’t forward the data to the
other network, at the same time, if computer D wants to transfer to F the network
is wide open, and two transmissions can happen at once.
• But if F wants to send data to A then the switch passes it through.
• This is essentially how big networks are constructed, including the biggest of all
which is the INTERNET.
• Which interconnects a bunch of smaller networks to a bigger network, and allows
inter-network communication.
packets
• When a big file is transferring a transferring medium will tide up, even if we had
1-kilo byte email it won't get through.
• It has to wait until the big file gets transferred or take a less efficient route.
• The solution is to cut big transmissions into many small pieces called packets.
• Each packet contains a destination address on the network so that switches know
where to forward them.
• This standard/protocol is called the “Internet Protocol” or “IP”.
Internet of things
• The internet has grown over many years.
• Today, there are an estimated number of 10 billion devices online connected to the
internet, and continues to grow rapidly as refrigerators, TVs, cars, and other
devices from an “Internet of Things” or “IoT”.
• The physical object that connects to the internet like location trackers, thermostat,
lock, light bulbs, fitness tracker shoes, and even your mobile phones and
computers are called IoT Devices.
UDP and Port number.
• In the internet protocol packets contain their destination address, but when they
reach the destination, the computer may not know which application requests that
data.
• Whether it is for a telegram app or a YouTube app.
• For this reason, more advanced protocols were developed that sits on top of IP.
…
• One of the most common is User Datagram Protocol (UDP).
• UDP adds extra headers to the packets like a port number.
• every program wanting to access the internet will ask its host computer operating
system to be given up a unique port number.
• for example, a video downloader app may ask for port number 3323. When a
packet arrives at the computer, the operating system will look inside the UDP
header and read the port number.
• Then, if it sees port number 3323, it will give the packet to the video downloader
app.
• if a packet is missing or data got corrupted at some point by a faulty Ethernet
cable UDP doesn’t offer any mechanism to fix the data, or request a new copy.
• In UDP the sender will send the packets but it will have no confirmation whether
the packets arrive or not.
Transmission Control Protocol
• Programs use Transmission Control Protocol (TCP/IP) if they want to make sure
their data has arrived successfully.
• In TCP packets are given a sequential number, which allows the receiving
computer to sort in the correct order even if they arrive in a different order.
• Once a computer has correctly received a packet it will send back an
acknowledgment.
• Knowing that the packet made it successfully, the sender now can transmit the
next package.
• If the receiver doesn’t acknowledge the sender will retransmit the same packet.
• If a duplicate packet has arrived the receiver will discard it .
UDP vs TCP
computer with the given IP address that is running a special piece of software
• Any computer can be used as a server, but its resources will be limited like a
• most of the servers running in the world wide web use the Linux Operating
HTTP
• To ask for hypertext pages, there is a standard protocol called Hypertext transfer
protocol or HTTP.
• It has different commands like GET to read data, POST to create data, DELETE to
delete data, PATCH to modify data, and PUT to replace data.
• When you type a domain name into your browser, it automatically adds http:// to
the front. The previous URL would look like http://www.google.com/search.
HTTP Status codes.
The web server then returns the hypertext we requested.
Then our web browser will interpret the data inside it and render it to our screen.
If the webserver didn’t have the hypertext requested it will return a 404 status
code.
…
• There are many HTTP status codes a web server will send back 200 if
everything is OK, 500 if there is an error on the server, and so on.
HTTPS
HTTPS stands for Hypertext Transfer Protocol Secure.
It encrypts the information transferred between the server and the client.
Even if the man in the middle sees the packets, he/she won't be able to
understand their content.
HTML
Because the hypertext contains plain text, the browser has no idea which
is a header, paragraph, or image.
It makes it necessary to create a markup language to mark different parts
of the hypertext.
…
• Inside the plain text file document, you can add some commands.
Like <h1> for a heading, <p> for a paragraph,<img/> for an image and many
others.
When rendered It gives the document a proper look and feel.
They’re also other technologies that can be embedded inside HTML like
Cascading style sheets (CSS) to style color, shapes, and more, and JavaScript
to make the page dynamic and play with different events like mouse
movement and more.
Websites and Search Engine
A website is a collection of web pages grouped in various ways.
Different web pages were offering useful links, but they were maintained
manually by human labor.
Which makes it harder and unmanageable as websites grow in number.
so search engines like Google were developed.
…
• The search engine uses special software called web crawler which opens a
webpage automatically and adds to its list.
• when it finds another link in those web pages it will add them to its list
and follow the same steps.
• Then the search engine uses another software that contains search
algorithms to get requested search data from its list.
• If we search for the term ‘ball’, it will return a list of web pages that
contains the term ball in a different order.
• Google rise from other search engines due to its clever algorithm.
• There are also famous alternative search engines like Microsoft’s Bing
and Yahoo.
…
• A Web Designer is a graphic artist who is responsible for designing the layout and
visual appearance of a website.
• A web designer's main goal is to make sure the site is visually pleasing, user-friendly,
compatible across different devices, and encourages visitors to stay as long as possible.
• Web designers often deal with images, color palettes, fonts, and so on.
• A Web Developer is tasked with converting the web design into a functional website,
using different coding languages like HTML, CSS, JavaScript, PHP, and others.
• Based on their role, web developers can also be divided into three.
1. Front-End Developer: the part of the website that the user interacts with directly is
called a front-end or client-side application.
It includes everything seen on the browser. like tables, images, graphs, navigation
menus, and more.
HTML, CSS, and JavaScript are the languages used for front-end development.
…
2. Back-End Developer: the back-end is the server side of the website.
It is involved with data storage, data processing, authentication, authorization, and
other server-side functions.
PHP, SQL, and Python are a few of the coding languages that are available
for server-side(back-end) development.
3. Full-stack Developer: the ability to design complete applications and
websites. They work on both the front and back ends.
We’ll use HTML to structure the webpage document, CSS for colors and styles, and
Javascript for making it dynamic, and interactive, and manipulate the whole webpage.
PHP to handle server-side logic, and SQL to store Data Permanently.
HTML is a tool we use to create websites, It is use to give instructions to a
computer, Telling a computer what it is do step by step.
The HTML document has a file extension of .html.
you can use any text or code editor of your choice.
in the upcoming examples, we’ll be using Visual Studio Code, which you can
find at https://code.visualstudio.com/
HTML is a markup language, it is used for structuring hypertext files.
During your lab session create a folder called HTML on your desktop.
Open visual studio code and drag the folder into it.
…
• Add your first HTML file, let's call it first.html for now.
• You can call it whatever you want
…
• A valid HTML file must start with an HTML version declaration.
> It specifies which version of HTML you’re using.
Notes In Figure above that while the heading and the paragraph elements
are displayed on a separate line each, the bold and italic texts are
displayed next to each other. This is because the browser inserts a new line
every time it finds HTML elements like <h> and <p> , but it doesn’t insert
new lines for <b> and <i> HTML elements.
Conti,…
• Though a significant majority of HTML elements conform to the <start
tag> content </end tag> format, there are some HTML elements that have
a different format. These HTML elements are known as void elements.
• The following table shows the format of void elements and their
meanings.
• Attributes are mostly key-value pairs, written on the start tag of the element.
• Attributes are normally optional to many of the HTML tags. However, there
are some HTML elements that cannot function as intended without the use of
some attributes. The <img> HTML element is one such example.
• The <img> element should have the “src” attribute, which refers to the name
and location of the actual image that is required to be inserted into the
webpage.
…
• For this example, we will use an image file called ethiopian_airlines.jpg which is
located in our HTML folder.
first.html
<img src=“ethiopian_airlines.jpg “ height=“500” width=“600”>
Output
Conti,…
• The src, height, and width attributes give additional information for the
<img> element.
• elements may or may not have attributes. There are optional attributes
and required attributes. For example src attribute for <img> tag is
required, but height and width can be set automatically by the browser.
HTML Headings
• Don’t use the heading elements to make the text BIG or Bold. You have other
elements for such purposes.
• Your webpage should be structured properly. Very important texts like your main
title on the web page should be <h1> .
• It is not a good practice to add <h1> elements after other heading tags.
• If you ever wanted to have a bigger heading than <h1>. You can use the font-size
property of CSS.
…
HTML Paragraphs
• It is used to write a block of text.
• The browsers will remove any extra spaces and new lines.
first.html
• Comments are basically used for clean code so that if the new person checks your
code then he/she can easily understand your code.
Conti,…
• In HTML, comments are denoted by the <!-- And --> delimiters.
• Anything between these delimiters is considered a comment and is
ignored by the web browser when rendering the page.
Syntax
<!-- I’m a comments, so browser will not display me -->
for example:
<p> <b> <!-- I’m-- > bold text</b> </p>
<p> <strong> important text </strong></p>
output will be
bold text
important text
HTML Links
• HTML links are used to navigate from one page to another. It is also known as a
hyperlink.
• Links allow jumping to different web pages. They can be embedded inside a text,
• They allow users to click on a text or an image and be redirected to another page
• The anchor tag (<a> ) is used to create hyperlinks. An HTML element that is
Note that we have created the about.html In the same directory as first.html
Now, let's link these two pages.
First, add the target URL in first.html which will take us to about.html Inside
first.html use the relative path of the target URL.
…
The Target Attribute
• The relative path finds the other file relative to its position.
• If the about.html were located inside a directory called pages, the relative URL
will become pages/about.html.
Which tells the webserver to look for about.html inside the pages
directory.
In case you wanted to go one step back through folders, use double
dots and a backslash(../).
> Let's say you are in a pages directory if you want to link that takes
you to first.html which is located one folder back from pages.
this would be your link.
…
On the other hand, the absolute path contains all the information
necessary to locate a resource.
Linking Email address.
Local Links or Bookmarks
Creating Bookmarks
Add the id attribute to the target element.
…
…
…
HTML images
• To embed an image to webpages we use <img> tag.
• Use the src attribute to specify the location of the
image.
• In case the image is not found or not loaded we will
use the alt attribute to specify an alternative message
to display instead of the image.
…
• To set the image size used the height and width attributes.
• The default measurement is in pixels.
• Pixels are the smallest unit in the digital display.
• Many pixels connected horizontally and vertically create every image we see on
our screen.
HTML tables.
An HTML table is used to organize data in terms of rows and columns.
The <table></table> element will contain all the rows and columns.
Tables are one way of organizing contents or defining a layout for contents in a
webpage.
The major HTML tags used for creating tables and their meanings are presented in
the following table.
Conti,..
•.
…
• You can also give a background color and border color for the data cells.
Size of a column.
Viewport
The viewport is the user's visible area of a webpage, the viewport may vary
from device to device.
a viewport for mobile phones and desktop computers is different.
web pages were initially designed for computer screens only, so they have
a static design and fixed size.
it is very important to scale webpages for different screen sizes.
HTML Forms.
• Html forms are used to collect data from the user, to be processed
either locally by browser or sent to the server.
• The <form> element is used to contain different types of input
elements such as text areas, check boxes, submit buttons, date
pickers, and more.
HTML - Forms
• HTML forms are very important part of web development, allowing
users to input and submit data to a server.
• Html forms are used to collect data from the user, to be processed
either locally by browser or sent to the server.
• They are used for a wide range of purposes, such as user registration,
contact forms, search boxes, and more.
syntax : <form action=“”> </form>.
Inside the <form>
Conti,…
Label: the <label> element, which provides a text description for the
input field.
syntax: <label>….</label>
Conti,…
• Input: the <input> element is used so that user can enter information.
Input filed is created using tag. It is self closing tag.
…
…
…
…
…
Text Areas.
• It creates customizable text fields with specific rows and columns.
• You can hold the bottom right corner of the text area to resize to any
row and column.
…
• The form has an attribute called action which specifies where the
input data should be processed.
• And a method attribute that defines which HTTP method to use for
sending the data to the location specified by the action attribute.
…
Tells the browser to set
✓ the width of the web page's dimension to the device dimension, and
✓ the initial zoom level when the page is loaded initially by the
browser.
Inline Elements
These elements don’t start in a new line.
They only take the necessary width. Like <b>, <a>,
<sub>,<span> and more.
The <span> element is an inline container for part of the
text or document.
It can be used to style part of the text.