HTML Tutorial for Beginners(2022) - Change Text Alignment in HTML

HTML Tutorial for Beginners(2022) - Change Text Alignment in HTML

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

This video tutorial explains how to align text in HTML using the CSS text-align property. It covers the basics of text alignment, including how to center, right-align, and left-align text. The tutorial provides a demonstration using a sample HTML file, showing how to apply the text-align property within a style element. The video concludes with practical examples of changing text alignment and emphasizes the ease of using CSS for text alignment in web development.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary CSS property used to align text in HTML?

padding

margin

text-align

font-style

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where can the 'text-align' property be used in an HTML document?

In the title tag

In the script tag

Under the style attribute or style element

In the body tag

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to center align text using the 'text-align' property?

text-align: right;

text-align: left;

text-align: center;

text-align: justify;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the file name used in the demonstration for changing text alignment?

code16.html

demo.html

example.html

sample.html

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you change the text alignment to the right using CSS?

Set text-align to justify

Set text-align to right

Set text-align to center

Set text-align to left