Lec 03
Lec 03
Lecture 3
H T M L Elements
1
2024-11-09
2
2024-11-09
3
2024-11-09
4
2024-11-09
10
5
2024-11-09
11
Text direction
✓ Right to Left
<html dir="rtl">
<p dir=“rtl”> your paragraph </p>
✓ Left to Right
<html dir=“ltr">
<p dir=“ltr”> your paragraph </p>
12
6
2024-11-09
HTML Quotation
✓ HTML defines some elements for quotation such as:
✓ Blockquotes
– Content of <blockquote>
– To set a block of text off from the normal flow and
appearance of text
13
7
2024-11-09
15
16
8
2024-11-09
Alignment
✓ <p align="left">Left aligned paragraph</p>
✓ <p align="center">Centered paragraph</p>
✓ <p align="right">Right aligned paragraph</p>
✓ <p align="justify">Right aligned paragraph</p>
17
Font color
✓ To add the font color we should use an attribute called
color inside the opening font tag
This is <font color="red">Red</font> and This
is <font color="blue">Blue</font>
18
9
2024-11-09
Font type
<font face="Verdana">Verdana Text</font><br>
<font face="Courier New">Courier New Text</font>
Font size
There are 7 font size, the default font size is 3,
<font size="+4">Size 7</font><br>
<font size="+3">Size 6</font><br>
<font size="+2">Size 5</font><br>
<font size="+1">Size 4</font><br>
<font size=“+0">Size 3</font><br>
<font size="-1">Size 2</font><br>
<font size="-2">Size 1</font><br>
20
10
2024-11-09
Font size...
Or directly you can choose the font size
<font size="7">Size 7</font><br>
<font size="6">Size 6</font><br>
<font size="5">Size 5</font><br>
<font size="4">Size 4</font><br>
<font size="3">Size 3</font><br>
<font size="2">Size 2</font><br>
<font size="1">Size 1</font>
21
Font size...
✓ Another way to maximize or minimize the font by on step is
using <small> or <big> (based on the default font size)
<big>size 4</big><br>
<small>size 2</small><br>
<big><big>size 5</big></big><br>
22
11
2024-11-09
Add an Image
✓
• The src attribute provides the name of the image file that should be
inserted, and the alt attribute provides text that should be displayed if the
image is not available.
<img src="images.jpg" width=200 high=200 alt="my Image">
24
12
2024-11-09
List attribute
The attribute type used in ordered list and unordered list. (li: List Item)
Ordered Lists:
Unordered Lists:
<ol type="A"> 1: <ul type="circle">
1, 2, 3, 4, …. circle, square, disc
a: a, b, c, d,…. A:
A, B, C, D,....
i: i, ii, iii, iv,.... I:
I, II, III, IV,….
25
List attribute...
✓ <ol type="I">
<li>Windows (85%)
<li>Linux (10%)
<li>Mac (3%)
<li>Other (2%)
</ol>
<ul type="circle">
<li>Pepsi
<li>Crash
<li>7 Up
</ul>
26
13
2024-11-09
List attribute…
<li>German Companies
<li>Microsoft
<li>6
<li>7
<li>General
<li>Dubian
<li>BMW
<ul>
<li>American
Nested attribute:
</ol>
<ol>
<ol>
Companies
Motors
Class
<ol>
27
28
14
2024-11-09
29
30
15
2024-11-09
31
32
16
2024-11-09
33
Having Problems?
✓ I’ve changed my document, but when I reload the page in my
browser, it looks exactly the same.
– It could be you didn’t save your document before reloading, or you
may have saved it in a different directory.
✓
Half my page disappeared.
– This could happen if you are missing a closing bracket (>) or a
quotation mark within a tag. This is a common error when writing
HTML by hand.
34
17
2024-11-09
Having Problems?...
✓ I put in a graphic using the img element, but all that shows up is a
broken image icon.
– The broken graphic could mean a couple of things.
• it might mean that the browser is not finding the graphic. Make
sure that the URL to the image file is correct.
• Make sure that the image file is actually in the directory you’ve
specified.
• If the file is there, make sure it is in one of the formats that
web browsers can display (GIF, JPEG, or PNG) and that it is
named with the proper suffix (.gif, .jpeg or
.jpg, or .png, respectively).
35
18