Programming Languages Handout
Programming Languages Handout
Comprehensive Handout
1. HTML (HyperText Markup Language)
HTML is the standard markup language used to create the structure of web pages.
Basic Structure:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Core Elements:
- <html>: Root of the document
- <head>: Metadata and links to CSS/JS
- <body>: Visible content
- <h1> to <h6>: Headings
- <p>: Paragraph
- <a>: Hyperlinks
- <img>: Images
- <div>: Division container
- <span>: Inline container
Syntax:
selector { property: value; }
Types of CSS:
- Inline: style="color:blue;"
- Internal: <style> in HTML <head>
- External: Linked .css file
Key Properties:
- color, background, font-size, margin, padding, border, display, position, flexbox, grid
3. JavaScript (JS)
JavaScript is a scripting language used to create dynamic and interactive web content.
Basic Syntax:
let x = 10;
function greet() {
alert('Hello World');
}
Main Concepts:
- Variables (var, let, const)
- Functions, Loops (for, while), Conditions (if, else)
- DOM Manipulation: document.getElementById()
- Events: onclick, onload
4. C# (C-Sharp)
C# is a modern, object-oriented programming language developed by Microsoft, commonly
used for Windows apps, web services, and games.
Basic Structure:
using System;
class Program {
static void Main() {
Console.WriteLine("Hello World");
}
}
Core Concepts:
- Classes & Objects
- Inheritance, Polymorphism, Encapsulation
- Data Types, Loops, Methods, Events
Basic Structure:
#include<iostream>
using namespace std;
int main() {
cout << "Hello, World!";
return 0;
}
Key Concepts:
- Variables, Data Types
- Functions, Loops, Conditions
- Classes, Inheritance, Pointers, Templates