Front-End Web Development Report
Front-End Web Development Report
ii
ACKNOWLEDGEMENT
I take this opportunity to express a deep sense of gratitude towards Mr. Ishwar Singh Solanki, for
providing excellent guidance, encouragement and inspiration through-out the practical training.
Without his invaluable guidance, this practical training report would never have been a successful
one.
I also want to give thanks to all the faculty members of department of Computer Science
Engineering and my family for their love, support and encouragement during this time. I want to
thank my dear friends, the ones that remain here and the ones that have already left, for making
this period such an extraordinary experience in my life.
Last but not least, my heartiest thanks to all the persons, who have been a pillar of support during
the arduous time of training.
Manvendra Singh
iii
PREFACE
The present report is the outcome of the offline practical training on “Front End Web-
Development” provided by “Bit to Byte Robotics”. The objective of this training is to learn about
Front End Web Development with practical applications and to get a masterful grip on it. This
course provided me with hands-on experience and exposure to developing Front-End applications
for browsers. This course also helped in building a strong foundation on Front-End which provided
me with the tools to build a responsive web application.
During the tenure of 45 days, I learned about and worked on different technologies like HTML,
CSS, JavaScript and GitHub. I have also built a Front-End project using these technologies.
This report explains the concepts learnt during the internship along with the description of how
these technologies are used for the creation of the project.
iv
CONTENTS
v
List of Figures
vi
List of Tables
vii
CHAPTER 1: INTRODUCTION ABOUT THE COURSE
1.1 Objectives
Practical training is an integral part of skill development during the course of a technical degree.
In practical training, the student works in the actual industry while gaining real life experiences
and learning about the practical applications of the concepts learnt during the course of his/her
technical degree. Practical training offers the students a platform for recognizing their interests
and skills and refining them to absolute perfection. Practical training provides an opportunity to
gain first-hand experience of the industry while working with other experiences engineering
professionals and learning from them. Hence, practical training is of paramount importance for
increasing the overall employability of student by increasing and refining his/her competence in
the relevant skills.
For the particular course I pursued in the field of Front-End Web Development, the objectives
were as follows:
• To learn about the basics of HTML, CSS, JavaScript, GitHub and how to use them in
combination to design a powerful web user interface.
• To learn about the various job opportunities in the field.
• To learn about the use of git which is the industry standard for branch control.
• To learn about the methods to build static and dynamic web pages using HTML, CSS, and
JS and optimizing them for web.
1.2 Motivation
The motivation of pursuing the field of Front-End Web Development for practical training was
due to my actual interest in the field. Moreover, front-end requires the use of creativity and design
talents which is in-line with my actual skillset. I wanted to learn more about the process of
designing a user-interface. Before joining the course, I was already familiar with the basics of web
design but the training course helped me in refining my skills to the level required by the industry.
Due to this practical training, I was able to design a project using HTML, CSS and JS.
1
1.3 About the company
BBR is an emerging start-up Company providing innovative products to increase the productivity,
safety and quality of life based on latest technologies like- Embedded Robotics, AI and IoT. The
products are mainly developed for farmers to solve lethal and unsolved problems due to traditional
equipment and technologies but we have also a range of hardware and software both type of
products for industries and home appliance to replace traditional inefficient and risky system to
increase the productivity and safety.
2
CHAPTER 2: BASICS OF FRONT-END WEB DESIGN
Front-End is the client-side graphical user interface of the website that provides a way for the user
to interact with the website. Front-End is what the users usually see when they open a website.
Front-End Development is the development of the graphical user interface of a website, through
the use of HTML, CSS and JavaScript, so that users can view and interact with that website.
Front-End Developer is responsible for creating the user interface of a website. A front-end
developer defines how a web page will look to the end user.
3
CHAPTER 3: HTML
HyperText Markup Language (HTML) is the standard markup language for documents that are
designed to be displayed in a web browser. Technologies like Cascading Style Sheets (CSS) and
scripting languages like JavaScript can be integrated with HTML to design a powerful web
interface.
HTML elements form the foundation of HTML pages. By indicating structural semantics for text
elements like headings, paragraphs, lists, links, quotations and other objects, HTML offers a way
to generate structured texts. Tags, which are written in angle brackets, are used to distinguish
HTML elements.
Web browser typically read the HTML document from top to bottom and left to right. HTML tags
are used for the initial creation of HTML documents and to assign their properties/attributes.
An HTML file must have some essential tags the HTML file can be distinguished from the simple
text file by the web browser. There is no upper limit on the number of tags that can be used in an
HTML file.
All HTML tags must be enclosed within < > these brackets.
With a few exceptions, if open tag <tag> is used, then its corresponding close tag must also be
used </tag>.
Structure of an HTML webpage: The basic structure of a typical HTML page is shown below.
It contains some essential tags that form the foundation of every single HTML page.
4
Figure 3.1: Structure of an HTML webpage
<!DOCTYPE HTML>: Every HTML document should start with this line. It indicates to the
browser that the document is a modern HTML webpage.
<html>: This tag indicates the start and end of the HTML document. Everything in the webpage
goes inside this tag.
<head>: This tag is a container for the metadata and is placed between the <html> tag and the
<body> tag. Metadata is data about the HTML document which is not displayed on the screen. It
typically defines the document title, character set, styles, scripts and other meta information. It
controls and defines the HTML document.
<meta>: This tag tells the browser about the kind of characters that are used in the document. utf-
8 is most commonly used as it allows many languages in the world.
<title>: This tag defines the title of the webpage that is shown in the title bar of the web browser.
This title is also shown in search results as the link.
<body>: This tag defines the body of the HTML document. This includes the content that is
actually rendered on the screen in a website.
5
• Basic HTML
Tag Description
<!DOCTYPE> Defines the document type
<html> Defines an HTML document
<head> Contains metadata/information for the document
<title> Defines a title for the document
<body> Defines the document’s body
<h1> to <h6> Defines HTML headings
<p> Defines a paragraph
<br> Inserts a single line break
<hr> Defines a thematic change in the content
<!--…--> Defines a comment
Table 3.1: Basic HTML tags [4]
• Formatting
Tag Description
<abbr> Defines an abbreviation or an acronym
<address> Defines contact information for the author/owner of a document/article
<b> Defines bold text
Isolates a part of text that might be formatted in a different direction from other
<bdi>
text outside it
<bdo> Overrides the current text direction
<blockquote> Defines a section that is quoted from another source
<cite> Defines the title of a work
<code> Defines a piece of computer code
<del> Defines text that has been deleted from a document
<dfn> Specifies a term that is going to be defined within the content
<em> Defines emphasized text
<i> Defines a part of text in an alternate voice or mood
<ins> Defines a text that has been inserted into a document
<kbd> Defines keyboard input
<mark> Defines marked/highlighted text
<meter> Defines a scalar measurement within a known range (a gauge)
<pre> Defines preformatted text
<progress> Represents the progress of a task
<q> Defines a short quotation
<rp> Defines what to show in browsers that do not support ruby annotations
<rt> Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby> Defines a ruby annotation (for East Asian typography)
<s> Defines text that is no longer correct
<samp> Defines sample output from a computer program
<small> Defines smaller text
<strong> Defines important text
6
<sub> Defines subscripted text
<sup> Defines superscripted text
<template> Defines a container for content that should be hidden when the page loads
<time> Defines a specific time (or datetime)
<u> Defines some text that is unarticulated and styled differently from normal text
<var> Defines a variable
<wbr> Defines a possible line-break
Table 3.2: Formatting tags [4]
Tag Description
<form> Defines an HTML form for user input
<input> Defines an input control
<textarea> Defines a multiline input control (text area)
<button> Defines a clickable button
<select> Defines a drop-down list
<optgroup> Defines a group of related options in a drop-down list
<option> Defines an option in a drop-down list
<label> Defines a label for an <input> element
<fieldset> Groups related elements in a form
<legend> Defines a caption for a <fieldset> element
<datalist> Specifies a list of pre-defined options for input controls
<output> Defines the result of a calculation
Table 3.3: Forms and Input tags [4]
• Images
Tag Description
<img> Defines an image
<map> Defines a client-side image map
<area> Defines an area inside an image map
<canvas> Used to draw graphics, on the fly, via scripting (usually JavaScript)
<figcaption> Defines a caption for a <figure> element
<figure> Specifies self-contained content
<picture> Defines a container for multiple image resources
<svg> Defines a container for SVG graphics
<fieldset> Groups related elements in a form
<legend> Defines a caption for a <fieldset> element
<datalist> Specifies a list of pre-defined options for input controls
<output> Defines the result of a calculation
Table 3.4: Images tags [4]
7
• Links
Tag Description
<a> Defines a hyperlink
Defines the relationship between a document and an external resource (most used to
<link>
link to style sheets)
<nav> Defines navigation links
Table 3.5: Links tags [4]
• Lists
Tag Description
<ul> Defines an unordered list
<ol> Defines an ordered list
<li> Defines a list item
<dl> Defines a description list
<dt> Defines a term/name in a description list
<dd> Defines a description of a term/name in a description list
Table 3.6: Lists tags [4]
• Tables
Tag Description
<table> Defines a table
<caption> Defines a table caption
<th> Defines a header cell in a table
<tr> Defines a row in a table
<td> Defines a cell 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
<col> Specifies column properties for each column within a <colgroup> element
<colgroup> Specifies a group of one or more columns in a table for formatting
Table 3.7: Tables tags [4]
8
CHAPTER 4: CSS
The ability to offer the same HTML page in several styles for various rendering techniques,
including on-screen, in print, by voice (using a speech-based browser or screen reader), and on
Braille-based tactile devices, is also made possible by the separation of formatting and content. If
a user accesses the material on a mobile device, CSS additionally provides rules for different
formatting.
After creating and saving the CSS file, we just need to link the CSS and HTML files together so
that the browser can locate the CSS file.
To link the HTML file and the CSS file, add a link tag in the head of the HTML document:
Figure 4.1: Linking HTML and CSS file using link tag
9
The link element is used to link many types of documents, notably CSS but also blog feeds, help
documents, licenses, etc., to an HTML file
href: The CSS file’s location is indicated by the href attribute. The CSS file’s path must lead to
the appropriate folder.
10
3. ID (#): Select an element with the matching ID. Example:
#profile {}
#nav {}
#social {}
6. Adjacent sibling (+): Select an element directly beside another element. Example:
h1 + p {}
hr + p {}
li + li {}
7. General sibling (~): Select an element that’s at the same level. Example:
p ~ p {}
h1 ~ p {}
dd ~ dt {}
8. Attribute ([]): Select an element by its attribute. Mostly used for styling external links
differently. Example:
[data-state=“active”] {}
[href^= “http”] {}
[download] {}
11
• border-color
• border-width
• border-style
• border-radius
• font
• font-family
• font-style
• font-weight
• position (absolute, relative, fixed)
• z-index
• float
• clear
• overflow
• text-align
• box-sizing
• grid
• word-wrap
• word-spacing
12
CHAPTER 5: JAVASCRIPT
JavaScript forms the foundation of front-end web development and the backbone of the World
Wide Web alongside HTML and CSS. As of 2022, approximately 98% of websites utilize
JavaScript on the client side for webpage behavior, frequently integrating third-party libraries. A
dedicated JavaScript engine is available in every major web browser and is used to run the code
on users’ devices.
Adding JavaScript to a webpage: Similar to how CSS is applied to an HTML page, JavaScript
utilizes the same method. While CSS employs <link> elements to apply external stylesheets and
<style> elements to apply internal stylesheets, JavaScript uses the <script> element.
13
Example:
<head>
<script>
// JavaScript goes here
</script>
</head>
• External JavaScript: In this method, the JavaScript code is stored in a separate .js file
which is then linked to the HTML document using the <script> tag within the <head> tag.
Example:
<script src="script.js" defer></script>
Variables: They are the containers that store values. Declaration of a variable is done with the let
keyword, followed by the name assigned to the variable. Example:
let myVariable;
Declaration and assignment can also be done on the same line like this:
let myVariable = “Manvendra”;
14
Operators: An operator is a mathematical symbol that produces a result based on two values or
variables. Some of the most common operators are shown below:
• Addition (+)
• Subtraction (-)
• Multiplication (*)
• Division (/)
• Assignment (=)
• Strict equality (===)
• Not (!)
• Does-not-equal (!==)
Calling a function: Making use of a function requires calling it after it has been defined.
A function can be called by separating the function name from the argument values in parenthesis,
followed by a semicolon.
The JavaScript function calling syntax is demonstrated below.
function name(value1, value2, value3,…);
15
5.3 JavaScript Loops, Condition
Loops: Loops allow the execution of the same code over and over again. Every time the loop is
repeated, the code is frequently somewhat changed, or it runs with different variables.
JavaScript supports the following looping statements:
• for loop
• for/in loop
• for/of loop
• while loop
• do/while loop
Conditionals: Conditional statements allow the process of decision making in JavaScript code. It
allows the execution of different actions for different decisions.
JavaScript supports the following conditional statements:
• if statement
• else statement
• else if statement
• switch statement
Object Definition: JavaScript object can be defined and created with an object literal:
Example:
const person = {firstName: “Manvendra”, lastName: “Singh”, age: 25, branch:
“CS”};
Object Properties: The named values, in JavaScript objects, are called properties.
Example:
Property Value
firstName Manvendra
lastName Singh
age 25
branch CS
Table 5.2: Object Properties in JavaScript Example
16
Object Methods: Methods are actions that can be performed on objects. Methods are stored in
properties as function definitions. A method is a function stored as a property.
Property Value
firstName Manvendra
lastName Singh
age 25
branch CS
fullName function() {return this.firstName + “ ” + this.lastName;}
Table 5.3: Object Methods in JavaScript Example
17
5.6 JavaScript DOM
The objects that make up a web document’s structure and content are represented as data by the
Document Object Model (DOM).
The Document Object Model (DOM) is a programming interface for web documents. It serves as
a representation of the page so that programs can alter the document structure, appearance and
content. Programming languages like JavaScript can communicate with a page by interacting with
the nodes and objects that the DOM uses to represent the document. DOM representation allows
a web page to be manipulated. It is a representation of the web page that is object-oriented and can
be changed using a scripting language like JavaScript.
It is called an Object Model because documents are modelled using objects and the model takes
into account not only the structure of a document but also its behaviors and the objects that make
up its constituent parts, such as the HTML tag elements and attributes.
The need for DOM: The web pages are organised using HTML, behaviour is added using
JavaScript. The HTML document cannot be immediately understood by JavaScript when it is
loaded into the browser. Consequently, a related document is produced (DOM). The DOM
essentially represents the same HTML document in a new way by utilising objects. JavaScript can
readily interpret DOM; for example, it can understand object h1 in DOM but not tags
(<h1>H</h1>) in HTML documents. Now, JavaScript can use several functions to access each of
the objects (h1, p, etc.).
Structure of DOM: The structure of DOM can be compared to that of a tree or forest (multiple
trees). The tree-like representation of a document is also referred to as a “structural model”. There
are nodes at the ends of the tree's branches, and each node has objects in it. Nodes have the option
of adding event listeners, which are activated when a specified event occurs. The ability to generate
the same structure model with precisely the same objects and connections using any two DOM
implementations is known as structural isomorphism, and it is a key characteristic of DOM
structure models.
Methods of DOM:
• write(“string”): Writes the given string on the document.
• getElementById(): returns the element having the given id value.
• getElementsByName(): returns all the elements having the given name value.
• getElementsByTagName(): returns all the elements having the given tag name.
• getElementsByClassName(): returns all the elements having the given class name.
18
CHAPTER 6: PROJECT
Using the various skills acquired by during the duration of my practical training in the various
disciplines of front-end web development, I was able to create a clone of the popular web-word
game called Wordle from scratch using HTML, CSS and JavaScript.
In this game, the player needs to guess a five-letter word in six attempts. The hints are provided
after each attempt by the use of different colored tiles. A green tile indicates that the letter is in the
correct position, a yellow tile indicates that the letter is in the final word but is not placed at the
correct position and a gray tile indicates that the letter is not in the final word.
Figure 6.1: Wordle Project made using HTML, CSS and JavaScript
This project uses the programming logic of JavaScript to randomly select a word from a long list
of five-letter words each time the HTML page is reloaded. The comparison of the input to the
correct word is also handled by JavaScript. On each attempt, proper feedback is provided to the
player in the form of colored tiles. For this project, CSS is utilized to create an aesthetically
pleasing interface while the HTML code is minimal as most of the elements are generated by
JavaScript.
19
CONCLUSION
Summing up this whole report, this practical training was an educational and rewarding
experience. Needless to say, the skills I acquired during the duration of my training will prove to
be highly useful in my career as an IT professional. The experience I received during the span of
45 days while working and coordinating with fellow professionals also improved my soft-skills
like teamwork, communication and management. Although I had prior experience in the field of
web development, working in a professional organization helped me gain first-hand experience of
the industry while allowing me to explore the practical applications of my technical knowledge
which is not possible in a traditional classroom.
The project I developed during the practical training also improved my knowledge of HTML, CSS
and JavaScript as I was able to utilize various aspects of programming logic in my Wordle clone.
It broadened my horizon of thinking and will surely prove useful in the time to come.
In the future, I will keep improving my web-development skills while also acquiring the
knowledge of other disciplines like DSA which will help me integrate the knowledge of various
fields to create a better project.
20
REFERENCES
[1] Martin, Sarah. HTML, CSS, and JavaScript. The Definitive Guide to Squarespace, 2014.
[2] Duckett, Jon. Web design with HTML, CSS, JavaScript and jQuery set. Vol. 1. IN: Wiley,
2014.
[3] Goodman, Danny. Dynamic HTML: The definitive reference: A comprehensive resource
for HTML, CSS, DOM & JavaScript. "O'Reilly Media, Inc.", 2002.
[4] https://www.w3schools.com/tags/ref_byfunc.asp
[5] Duckett, Jon. HTML & CSS: design and build websites. Vol. 15. Indianapolis, IN: Wiley,
2011
21