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

Lab 1 Chapter 2&3: Sử dụng Front-Page để thực hiện bài thực hành này

The document provides examples of HTML code for creating web pages with headings, paragraphs, lists, and other formatting elements. It includes 7 exercises that demonstrate how to add headings, paragraphs with specific formatting, lists, definition lists, and more. The exercises show how to control text formatting, alignment, and color through use of HTML tags.

Uploaded by

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

Lab 1 Chapter 2&3: Sử dụng Front-Page để thực hiện bài thực hành này

The document provides examples of HTML code for creating web pages with headings, paragraphs, lists, and other formatting elements. It includes 7 exercises that demonstrate how to add headings, paragraphs with specific formatting, lists, definition lists, and more. The exercises show how to control text formatting, alignment, and color through use of HTML tags.

Uploaded by

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

LAB 1

Chapter 2&3 nh dng text va paragraph


S dng Front-Page thc hin bi thc hnh ny

Exercise 1

1.Write the HTML code for a Web page with a title of Using Headings. Add a third
level heading with the text My First HTML document.

<HTML>
<HEAD>
<TITLE> Using Headings</TITLE>
</HEAD>
<BODY>
<H3>My First HTML document</H2>
</BODY>
</HTML>

2.Create a Web page with the title Using Paragraphs. Create two paragraphs. Display a
fifth level heading between the two paragraphs.

<HTML>
<HEAD>
<TITLE> Using Paragraphs</TITLE>
</HEAD>
<BODY>
<P>
aaaaaaaaa
<H5>In between</H5>
<P>
bbbbbb
</BODY></HTML>

Exercise 2

1. Create a Web page that has a title My first page. Create a second level heading
Introduction to HTML. Add three paragraphs to the page. Each paragraph should
have a minimum of 5 lines. The paragraphs must be separated by two lines.

<HTML>
<HEAD>
<TITLE> My first page</TITLE>
</HEAD>
<BODY>
<H2>Introduction to HTML</H2>
<P>
aa<BR>aa<BR>aa<BR>aa<BR>aa
<BR><BR>
<P>
bb<BR>bb<BR>bb<BR>bb<BR>bb
<BR><BR>
<P>
cc<BR>cc<BR>cc<BR>cc<BR>cc

</BODY>
</HTML>

2. Format the paragraphs so that the text is in italics and blue in color.

<HTML>
<HEAD>
<TITLE> My first page</TITLE>
</HEAD>
<BODY>
<H2>Introduction to HTML</H2>
<P><FONT color = blue><I>
aa<BR>aa<BR>aa<BR>aa<BR>aa</FONT></I>
<BR><BR>
<P><FONT color = blue><I>
bb<BR>bb<BR>bb<BR>bb<BR>bb</FONT></I>
<BR><BR>
<P><FONT color = blue><I>
cc<BR>cc<BR>cc<BR>cc<BR>cc</FONT></I>
</BODY>
</HTML>

3.Add a third level heading after the second paragraph. Center the heading and change
the font to Arial.

<HTML>
<HEAD>
<TITLE> My first page</TITLE>
</HEAD>
<BODY>
<H2>Introduction to HTML</H2>
<P><FONT color = blue><I>
aa<BR>aa<BR>aa<BR>aa<BR>aa</FONT></I>
<BR><BR>
<P><FONT color = blue><I>
bb<BR>bb<BR>bb<BR>bb<BR>bb</FONT></I>
<BR><BR>
<H3><Center><Font face = arial>Heading after para
2</FONT></CENTER></H3>
<P><FONT color = blue><I>
cc<BR>cc<BR>cc<BR>cc<BR>cc</FONT></I>
</BODY>
</HTML>

4. Right-align the text of the third paragraph.

<HTML>
<HEAD>
<TITLE> My first page</TITLE>
</HEAD>
<BODY>
<H2>Introduction to HTML</H2>
<P><FONT color = blue><I>
aa<BR>aa<BR>aa<BR>aa<BR>aa</FONT></I>
<BR><BR>
<P><FONT color = blue><I>
bb<BR>bb<BR>bb<BR>bb<BR>bb</FONT></I>
<BR><BR>
<H3><Center><Font face = arial>Heading after para
2</FONT></CENTER></H3>
<P align = right><FONT color = blue><I>
cc<BR>cc<BR>cc<BR>cc<BR>cc</FONT></I>
</BODY>
</HTML>

5. Draw a line after the main heading. Center the line. The line should span half the
page.

<HTML>
<HEAD>
<TITLE> My first page</TITLE>
</HEAD>
<BODY>
<H2>Introduction to HTML</H2>
<HR align = center width = 50%>
<P><FONT color = blue><I>
aa<BR>aa<BR>aa<BR>aa<BR>aa</FONT></I>
<BR><BR>
<P><FONT color = blue><I>
bb<BR>bb<BR>bb<BR>bb<BR>bb</FONT></I>
<BR><BR>
<H3><Center><Font face = arial>Heading after para
2</FONT></CENTER></H3>
<P align = right><FONT color = blue><I>
cc<BR>cc<BR>cc<BR>cc<BR>cc</FONT></I>
</BODY>
</HTML>

6. Change the color of the main heading to limegreen. HTML should be displayed in
red. Center the heading.

<HTML>
<HEAD>
<TITLE> My first page</TITLE>
</HEAD>
<BODY>
<H2><CENTER><FONT color = limegreen>Introduction to </FONT><FONT color
= red>HTML</FONT></CENTER></H2>
<HR align = center width = 50%>
<P><FONT color = blue><I>
aa<BR>aa<BR>aa<BR>aa<BR>aa</FONT></I>
<BR><BR>
<P><FONT color = blue><I>
bb<BR>bb<BR>bb<BR>bb<BR>bb</FONT></I>
<BR><BR>
<H3><Center><Font face = arial>Heading after para 2</FONT></CENTER></H3>
<P align = right><FONT color = blue><I>
cc<BR>cc<BR>cc<BR>cc<BR>cc</FONT></I>
</BODY>
</HTML>

7. Change the color of the page to lavender.

<HTML>
<HEAD>
<TITLE> My first page</TITLE>
</HEAD>
<BODY BGCOLOR = lavender>
<H2><CENTER><FONT color = limegreen>Introduction to </FONT><FONT
color = red>HTML</FONT></CENTER></H2>
<HR align = center width = 50%>
<P><FONT color = blue><I>
aa<BR>aa<BR>aa<BR>aa<BR>aa</FONT></I>
<BR><BR>
<P><FONT color = blue><I>
bb<BR>bb<BR>bb<BR>bb<BR>bb</FONT></I>
<BR><BR>
<H3><Center><Font face = arial>Heading after para
2</FONT></CENTER></H3>
<P align = right><FONT color = blue><I>
cc<BR>cc<BR>cc<BR>cc<BR>cc</FONT></I>
</BODY>
</HTML>

Exercise 3

1.Create a list on a Web page to display the following information:


Monday
9 am - 11 am Workshop
Tuesday
10 am - 11 am Training programme
Wednesday
Thursday
Holiday
Friday

<HTML>
<UL>
<LI>Monday
<UL>
<LI>9 am - 11 am Workshop
</UL>
<LI>Tuesday
<UL>
<LI>10 am - 11 am Training programme
</UL>

<LI>Wednesday
<LI>Thursday
<UL>
<LI>Holiday
</UL>
<LI>Friday
</UL>
</HTML>

2. Create the following definition list

Peacock
National bird of India

Internet
A network of networks

HTML
HyperText Markup Language

<HTML>
<HEAD>
<TITLE>Learning HTML</TITLE>
<BODY>
<DL>
<DT>Peacock
<DD>National bird of India
<DT>Internet
<DD>A network of networks
<DT>HTML
<DD>HyperText Markup Language
</DL>
</BODY>
</HTML>

You might also like