Basic of Web Development
JavaScript, CSS, and HTML work together to make up the user-facing elements of most websites and online applications.
Think of these coding languages as the components of a house:
HTML is the foundation of the house. It provides the basic layout, structure, and content of a website.
CSS is the interior design. It provides design, fonts, colors, effects, and other visual elements.
JavaScript is the electrical and plumbing systems. JS brings dynamism and interactivity to the website. For example, pop-ups, animations, video and social media embeds, drop-down menus, and many other website components are created using JavaScript.
HTML is the standard markup language for creating Web pages.
HTML describes the structure of a Web page
HTML uses a system of tags to define different elements such as headings, paragraphs, images, links, and more.
Example :-
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
<img src="example.jpg" alt="Example Image">
</body>
</html>
CSS is used to style HTML elements and control their appearance on the web page.
It allows you to define properties like colors, fonts, margins, padding, and layout.
CSS can be applied directly within HTML using <style> tags or linked from an external stylesheet.
Example :-
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
font-size: 20px;
}
Javascripting language used to make webpages interactive (e.g., having complex animations, clickable buttons, popup menus, etc.)
Here are also more advanced server side versions of JavaScript such as Node.js, which allow you to add more functionality to a website than downloading files (such as realtime collaboration between multiple computers).
JavaScript Program To Print Hello World
// the hello world program
console.log('Hello World');
// the hello world program
alert("Hello, World!");
// the hello world program
document.write('Hello, World!');