Session 1 2
Session 1 2
Session 1 2
1
ENG/AHMED SHAMS
Definition of Website, Brwoser
all the logic behind the scenes that supports your website.
To learn Back-end
PHP/Python.
SQL
Web Sites
Front-end Back-end
1. HTML 1. Php
2. CSS 2. Python
3. JS 3. database
4. BootStrap
Visual Studio Code
Free source-code editor .
provides support for various programming languages and features
Help to build websites
Link to download:
https://code.visualstudio.com/
HTML
HTML stands for Hyper Text Markup Language
pages
An HTML element is defined by a start tag, some content, and an end tag:
<tagname> Content goes here... </tagname>
The HTML element is everything from the start tag to the end tag.
web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and
display them correctly.
A browser does not display the HTML tags, but uses them to determine how to
display the document:
HTML Page Structure
Structure of Any page
Headers.
Paragraph.
Links.
Images.
Videos.
Lists.
Tables.
Forms.
Headers
HTML headings are titles or subtitles that you want to display on a webpage.
<body>
<h1>Heading-1</h1>
<h2>Heading-2</h2>
<h3>Heading-3</h3>
<h4>Heading-4</h4>
<h5>Heading-5</h5>
<h6>Heading-6</h6>
</body>
</html>
Task
Paragraph
The HTML <p> element defines a paragraph.
Example:
<p>This is a paragraph.</p>
cannot change the display by adding extra spaces or extra lines in your HTML
code.The browser will automatically remove any extra spaces and lines when the
page is displayed
Example
<p>
This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</p>
HTML Horizontal Rules
The <hr> element is used to separate content (or define a change) in an HTML page
<html>
<head>
<title>
Session-1
</title>
</head>
<body>
<h1>This is heading 1</h1>
<p>This is some text.</p>
<hr>
<h2>This is heading 2</h2>
<p>This is some other text.</p>
<hr>
</body>
</html>
HTML Line Breaks
The HTML <br> element defines a line break.
<html>
<head>
<title>
Session-1
</title>
</head>
<body>
<p>This paragrap <br>
contains a lot of linein the source code <br>
but the browserignores it.</p>
</body>
</html>
Task
Task
Links
HTML links are hyperlinks.
You can click on a link and jump to another document.
Note: A link does not have to be text. A link can be an image or any
other HTML element!
</head>
<body> Page-1
<h1>Page One</h1>
<a href="C:\Users\LENOVO\Desktop\SESSION-2\page2.html">Go To Page Two</a><br>
<br>
<a href="https://www.google.com/index.html">GOOGLE Link</a>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body> Page-2
<h1>Welcome To PAGE-2 TWO</h1>
</body>
</html>
SESSION-
2
ENG/AHMED SHAMS
HTML Images
• The HTML <img> tag is used to embed an image in a web page.
• The <img> tag is empty, it contains attributes only, and does not have a
closing tag.
• Example
• <img src="img_chania.jpg" >
• Example
• <img src="img_chania.jpg" alt="Flowers in Chania">
Exmple
<html>
<head>
<title>PageOne</title>
</head>
<body>
</body>
</html>
HTML Videos
• Example
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Example
<html>
<head>
<title>PageOne</title>
</head>
<body>
<h1> Cooking</h1>
<p> Cooking is a beautiful job it is allow us to eat</p>
</body>
</html>
HTML Attributes
• All HTML elements can have attributes
• name="value“
Style Attribute
• The HTML style attribute is used to add styles to an element, such as color,
font, size, and more.
Example:
<body style="background-color:powderblue;">
</body>
Text Color
• The CSS color property defines the text color for an HTML element:
Example:
<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>
Text Size
• The CSS font-size property defines the text size for an HTML element:
Example:
<h1 style="font-size:300px;">This is a heading</h1>
<p style="font-size:160px;">This is a paragraph.</p>
Text Alignment
• The CSS text-align property defines the horizontal text alignment for an HTML element:
Example:
<h1 style="text-align:right; color: brown; font-size: 60px;">This is a heading</h1>
Lists in html
Ordered List
Un-Ordered List
DIV element
Class & ID
EXAMPLE:
Table Tags
Tag Description
<table>…</table> Define a table
<tr>….</tr> Used to make rows for table
<th>…..<th> Used to make headers(columns) for table
<td>….</td> Used to put data into cells in table
<table>
<tr>
Example
<th> ID</th>
<th>Name </th>
<th> Phone</th>
<td>shams</td>
<td>11111</td>
</tr>
<tr>
<td>3</td>
<td>adel</td>
<td>3333</td>
</tr>
</table>
HTML Lists
HTML lists allow web developers to group a set of related items in lists.
Types of Lists:
Ordered List.
Un-Ordered List
Example
LIST Item Tag
Example:
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Ordered HTML List
Example:
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
HTML Description Lists
Tag Description
<dl> tag defines the description list
<dt> tag defines the term (name)
<dd> tag describes each term
EXAMPLE
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
HTML Forms
An HTML form I
o is used to collect user input. The user input is most often sent to a server for
processing.
Div Element
The <div> tag defines a division or a section in an HTML document.