0% found this document useful (0 votes)
29 views10 pages

Chapter 2 (Headings, Paragraphs, Breaks Horizontal Rules)

The document discusses HTML headings, paragraphs, breaks, and horizontal rules. It provides examples of how to use heading, paragraph, break, and horizontal rule elements in HTML. It also explains the purpose and proper usage of each element.

Uploaded by

Charbel Hatem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views10 pages

Chapter 2 (Headings, Paragraphs, Breaks Horizontal Rules)

The document discusses HTML headings, paragraphs, breaks, and horizontal rules. It provides examples of how to use heading, paragraph, break, and horizontal rule elements in HTML. It also explains the purpose and proper usage of each element.

Uploaded by

Charbel Hatem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

CSC 201

Introduction to HTML

Chapter 2 - Headings, Paragraphs,


Breaks & Horizontal Rules

1
Headings, Paragraphs, Breaks & Horizontal
Rules

In this chapter you will add headings to your page, insert


paragraphs, add some breaks, and add horizontal
rules.
Objectives
Upon completing this section, you should be able to
1. List and describe the different Heading elements.
2. Use Paragraphs to add text to a document.
3. Insert breaks where necessary.
4. Add a Horizontal Rule.

2
Headings, <Hx> </Hx>
 Inside the BODY element, heading elements
H1 through H6 are generally used for major
divisions of the document.

1. H1: should be used as the highest level of heading, H2


as the next highest, and so forth.

2. You should not skip heading levels: e.g., an H3 should


not appear after an H1, unless there is an H2 between
them.

3
Headings, <Hx> </Hx>
<HTML>
<HEAD>
<TITLE> Example Page</TITLE>
</HEAD>
Heading 1
<BODY> Heading 2
<H1> Heading 1 </H1>
<H2> Heading 2 </H2> Heading 3
<H3> Heading 3 </H3> Heading 4
<H4> Heading 4 </H4> Heading 5
<H5> Heading 5 </H5> Heading 6
<H6> Heading 6 </H6>
</BODY>
</HTML>

4
Paragraphs, <P> </P>
 Paragraphs allow you to add text to a
document in such a way that it will
automatically adjust the end of line to suite
the window size of the browser in which it
is being displayed. Each line of text will
stretch the entire length of the window.

5
Paragraphs, <P> </P>
<HTML><HEAD>
<TITLE> Example Page</TITLE> Heading 1
</HEAD> Paragraph
<BODY> 1111111111111111111111111111111111111111
<H1> Heading 1 </H1> 1111111111111111111111
<P> Paragraph
1111111111111111111111111111111111111111
1111111111111111111111</P>
Heading 2
<H2> Heading 2 </H2> Paragraph 2,….
<P> Paragraph 2, ….</P>
<H3> Heading 3 </H3>
Heading 3
<P> Paragraph 3, ….</P> Paragraph 3,….
<H4> Heading 4 </H4> Heading 4
<P> Paragraph 4, ….</P>
Paragraph 4,….
<H5> Heading 5 </H5>
<P> Paragraph 5, ….</P> Heading 5
<H6> Heading 6</H6> Paragraph 5,….
<P> Paragraph 6, ….</P> Heading 6
</BODY></HTML> Paragraph 6,….

6
Break, <BR>
 Line breaks allow you to decide where the text
will break on a line or continue to the end of the
window.
 A <BR> is an empty Element, meaning that it
may contain attributes but it does not contain
content.
 The <BR> element does not have a closing tag.

7
Break, <BR>
<HTML>
<HEAD>
<TITLE> Example Page</TITLE>
</HEAD>
<BODY> Heading 1
<H1> Heading 1 </H1> Paragraph 1,….
<P>Paragraph 1, <BR>
Line 2 <BR> Line 3 <BR>…. Line 2
</P> Line 3
</BODY> ….
</HTML>

8
Horizontal Rule, <HR>
 The <HR> element causes the
browser to display a horizontal
line (rule) in your document.
 <HR> does not use a closing tag,
</HR>.

9
Horizontal Rule, <HR>
<HTML>
<HEAD>
<TITLE> Example Page</TITLE>
</HEAD>
<BODY> Heading 1
<H1> Heading 1 </H1> Paragraph 1,….
<P>Paragraph 1, <BR>
Line 2 <BR> Line 2
<HR>Line 3 <BR> ______________________
</P> _____
</BODY>
Line 3
</HTML>

10

You might also like