Website Development: JS-Part 3

What is meant by website development?

Vatsal Kumar
4 min readDec 11, 2022
Photo by Luca Bravo on Unsplash

Creating, constructing, and managing websites and web applications that are accessible online and through a browser are jobs that fall under the umbrella of web development, often known as website development. However, it also involves database management, web development, and web design.

Jobs in web development also referred to as website development, including creating, maintaining, and developing websites and web applications that are accessible online and through a browser. Web development, web design, and database management could also be involved.

What is JS?

Photo by Christopher Gower on Unsplash

What is JS and why it is used?

JavaScript is a text-based computer language that may make web pages interactive on both the client and server sides. Whereas HTML and CSS provide structure and style to web pages, JavaScript adds interactive elements that consumers find appealing.

What is the difference between HTML and JS?

While JavaScript (abbreviated as JS) is a scripting language, HTML is a markup language. We use HTML to create web pages or web applications. We can also embed JS programs as scripts in the HTML code.

What is the difference between CSS and JS?

CSS and JavaScript are both used on HTML-based Web pages, but for different purposes. CSS is used to create better layouts for the user to feel at ease with the Web page. JavaScript is used to interact with webpages and the user.

You can make yourself a website by simply going to Codepen.

What is Codepen?

A social development environment is CodePen. Its core functionality is the ability to write code in the browser and view the results as you construct. A practical and free online code editor for developers of any experience level, but especially liberating for those just starting with coding.

CodePen is a tool for collaboratively altering open-source code. As a SAAS-based browser-based alternative to traditional text editor software, CodePen provides front-end web designers. It’s also a great training tool for beginner developers because it helps you spot mistakes immediately in a group context.

With this tool, you can learn, create, execute, and test your Python script. After opening it locally, you can use this IDE to continue building the script. You can download local copies of the code and output.

We’ll start with the CSS part as we’ve already finished the website in my HTML part of the website. Follow these steps to make your first website about your hobbies.

As we did this in HTML,

And this in CSS,

We’ll be using JS to create some basic functions. First, do some coding in the HTML and CSS.

HTML

<html>
<head>
<title>Span&Div</title>
</head>
<body>
<audio id=”
https://mahdihat791.github.io/v2/test.mp3">
<hr>
<p>
Span is an inline element which means you can arrange elements horizontally side by side.
</p>
<hr>
<span class=”sp” onclick=”spanlem()”>

</span>
<span class=”sp” onclick=”spanlem()”>

</span>
<hr>
<div class=”di” onclick=”divelem()”>

</div>
<div class=”di” onclick=”divelem()”>

</div>

(You can just copy-paste this!)

CSS

body{
text-align: center;
font-size: 20px;
}

.sp,.di
{
margin:20px;
}

(You can just copy-paste this!)

And finally the JS

function spanlem() {
window.alert(“This is an Span element”);
}
function divelem() {
window.alert(“This is an div element”);

}

(You can just copy-paste this!)

Thanks for reading. Please clap for me!

If you’re still here then you have the right to know why I put pics instead of writing because — (scroll down)

I am lazy!

Thanks for reading. Please clap for me!

--

--

Vatsal Kumar
Vatsal Kumar

Written by Vatsal Kumar

Vatsal is a coding enthusiast and a youtuber

No responses yet