0% found this document useful (0 votes)
7 views

introduction to programming

The document provides an introduction to programming, explaining the concepts of syntax (rules) and semantics (meaning) in code. It outlines various programming languages, including high-level languages like C, C++, Java, Python, and JavaScript, as well as web development languages such as HTML, CSS, and PHP. Additionally, it includes examples of HTML features, links, tools, and a brief example of an HTML page structure.

Uploaded by

ruthlee794
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

introduction to programming

The document provides an introduction to programming, explaining the concepts of syntax (rules) and semantics (meaning) in code. It outlines various programming languages, including high-level languages like C, C++, Java, Python, and JavaScript, as well as web development languages such as HTML, CSS, and PHP. Additionally, it includes examples of HTML features, links, tools, and a brief example of an HTML page structure.

Uploaded by

ruthlee794
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Add tags 5 Mar 2025, 11:17 pm

INTRODUCTION TO PROGRAMING

Programming is the process of writing, texting, and maintaining codes


that a computer can understand and execute to perform specific
tasks.
They consist of SYNTAX (RULES) & SEMANTICS (MEANING) that
allows developers to write codes for software, website and
applications.

SYNTAX (RULES) = Syntax refers to the set of rules that define


the correct structure of a program in a specific language. It
determines how Thr keywords, symbols and characters should
be arranged, and if The syntax is incorrect, the program will
produce and error and fail to execute.
EXAMPLES OF SYNTAX

Python
For The incorrect =
If there is an error it will tell you
(code error= line 1
(subject of error ))

For Correct =

SEMANTICS (MEANING) = Semantics programming refer to the


meaning behind a syntactically correct program

So the summary of these is that


Syntax is about the structure of code (rule)
Semantics is about the meaning of the code (logic)

PROGRAMMING LANGUAGES
1. Low level languages
2. High level languages

HIGH LEVEL LANGUAGES

General Purpose Language


1. C ( doesn't stand for any meaning) = used for programming

2. C++( ++ represent an improved version of C) =used for games


development and high performance applications

3. Java= used for enterprise applications and Android apps

4. Python(.py)= used for web development, AI, data science

5. Java script (.js)= used for web development

WEB DEVELOPMENT LANGUAGES

1. HTML(Hypertext Markup Language) = used for structuring page

2. CSS( Cascading style sheets) = used for styling web pages

3. PHP(personal home page) = used for back end development


HTML

Its used to create web pages. It's defines the content and layout of a
web page using element like headings, paragraphs, images, links, and
forms

FEATURES OF HTML

1. Uses tags ( <p>, <h1>, <a>, <div>, <li> etc)

2. Works with CSS( for styling) and java script for interactivity

3. Support multimedia like image, videos, audio etc

LINKS AND TOOLS FOR HTML

1. Anchor link (<a> tag)


Used to create hyperlink to other web pages, sections and external
websites
Eg
<a href="https://www.google.com">Visit Google</a>
Link to an email
<a href="mailto:[email protected]">Send an Email</a>

Link to a phone number


<a href="tel:+2347035981002">Call Us</a>
Etc

2. Forms(<form>)
Eg.
<form action="submit.php" method="POST">
<input type="text" name="username" placeholder="Enter your
name">
<input type="submit" value="Submit">
</form>

A BRIEF EXAMPLES OF HTML PAGE

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>JavaScript Linking</title>
<link rel="stylesheet" href="style.css"> <!-- Linking CSS -->
</head>
<body>
<h1>Click the button to see a message</h1>
<button onclick="showMessage()">Click Me</button>

<script src="script.js"></script> <!-- Linking external JavaScript -->


</body>
</html>
Java script file (script.js)

function showMessage() {
alert("Hello! This is a JavaScript message.");
}

You might also like