Search Header Logo
Y8 T1W4 Lesson 1: Text Alignment

Y8 T1W4 Lesson 1: Text Alignment

Assessment

Presentation

Other, Computers

8th Grade

Hard

Created by

Detha Prastyphylia

Used 2+ times

FREE Resource

22 Slides • 0 Questions

1

Align Attribute

Changing the text alignment of headings and paragraphs on HTML.

Slide image

2

First, we need to learn

about Attribute in HTML

Attribute is a special keyword

used inside the opening tag

to control the tag's behaviour.

3

keyword="behaviour"

Above is the structure of an attribute.


Don't forget to use equal symbol = after the keyword,

and put the behaviour in the quotation marks " ".

4

<tag keyword="behaviour">

Above is how it looks like if we write

an opening tag complete with its attribute.


Don't forget to put space after the tag,

before we begin writing the attribute.

5

Today, we'll learn how to use

attributes to change text alignment.

How to use attributes to change text alignment

in a paragraph or in a heading in HTML?

6

<p>INSERT TEXT HERE</p>

This is how we usually write Paragraph tag, right?

What if we want to change its alignment?

7

align

…is the keyword of the attribute used

for changing the text alignment.

8

align=""

…is how the attribute itself would look like.


Let's try applying it to a Paragraph 👉

9

<p align="">INSERT TEXT HERE</p>

Example of how the opening tag would look like

if we want to have a paragraph with certain alignment.

10

Slide image

11

Slide image

12

Slide image


13

Changing Text Alignment on HTML

  • Attribute Keyword:

    align

  • Attribute Behaviour:

    - center

    - justify

    - right

    - left (default alignment)

Slide image

14

<p align="center">INSERT TEXT HERE</p>

Changing the text alignment

of a paragraph aligned to the centre.

15

<p align="justify">INSERT TEXT HERE</p>

Changing the text alignment

of a paragraph aligned to both sides.

16

<p align="right">INSERT TEXT HERE</p>

Changing the text alignment

of a paragraph aligned to right side.

17

<p align="left">INSERT TEXT HERE</p>

Changing the text alignment

of a paragraph aligned to left side.

18

<p>INSERT TEXT HERE</p>

<p align="">INSERT TEXT HERE</p>

Without using attribute

vs with using attribute.

19

What if I want to make a medium-sized heading with center text alignment, and it would say: HELLO WORLD

Please type down the HTML tag for that heading

and then submit to Zoom chat :)

20

<h3 align="center">HELLO WORLD</h3>

What if I want to make a medium-sized heading

with center text alignment, and it would say: HELLO WORLD

21

What if I want to make a big-sized heading with right text alignment, and it would say: THANK YOU ALL

Please type down the HTML tag for that heading

and then submit to Zoom chat :)

22

<h1 align="right">THANK YOU ALL</h1>

What if I want to make a big-sized heading

with right text alignment, and it would say: THANK YOU ALL

Align Attribute

Changing the text alignment of headings and paragraphs on HTML.

Slide image

Show answer

Auto Play

Slide 1 / 22

SLIDE