0% found this document useful (0 votes)
6 views5 pages

Adding Text

The document provides instructions on how to add and format text in HTML, including creating new paragraphs, changing alignment, adding line breaks, and inserting headings. It also covers how to use tags for bold, italic, and underlined text, as well as adding block quotes, comments, and horizontal lines. Examples are provided for each formatting option to illustrate the correct usage of HTML tags.

Uploaded by

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

Adding Text

The document provides instructions on how to add and format text in HTML, including creating new paragraphs, changing alignment, adding line breaks, and inserting headings. It also covers how to use tags for bold, italic, and underlined text, as well as adding block quotes, comments, and horizontal lines. Examples are provided for each formatting option to illustrate the correct usage of HTML tags.

Uploaded by

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

Adding Text

1. Create a New Paragraph


 You can use paragraph tags to start new paragraphs in an HTML document. In a word
processing program, you press Enter or Return to separate blocks of text. Web browsers do
not read these line breaks. Instead, you must insert a <p> tag in your HTML any time you
want to start a new paragraph in your Web page.
 Create a New Paragraph
1 Type <P> to start a new paragraph.
2 Type your text.
3 Type </P> at the end of the paragraph.
 Example: <p> Ethiopia, one of the world's oldest nations, traces its history to ancient
civilizations like the Aksumite Empire (c. 100 AD). It resisted colonial rule, defeated Italy at
Adwa (1896), and saw Emperor Haile Selassie’s rule before a 1974 revolution led to the Derg
regime and later democracy.</P>
2. Change Paragraph Alignment
 Paragraphs are left-aligned by default, but you can choose a different alignment using the
align tags. See the section “Change Paragraph Alignment” to learn more.
 You can control the horizontal positioning, or alignment of your paragraphs using the ALIGN
attribute. You can choose to align a paragraph to the left, right, or center, or justify the text
so it is aligned on both the left and the right.
 Change Paragraph Alignment
1 Click inside the <P> tag in which you want to change the alignment.
2 Type a space and then ALIGN=”?”, replacing ? with Left, Center, Right, or Justify.
Example: <p ALIGN =”center”> Ethiopia, one of the world's oldest nations, traces its history to
ancient civilizations like the Aksumite Empire (c. 100 AD). It resisted colonial rule, defeated
Italy at Adwa (1896), and saw Emperor Haile Selassie’s rule before a 1974 revolution led to the
Derg regime and later democracy.</P>
3. Add a Line Break
 You can use the line break tag, <BR>, to control where your text breaks. Web browsers
normally wrap text automatically; when a line of text reaches the right side of the browser
window, it breaks and continues on the next line. You can insert a line break to instruct the
browser to break the text and go to a new line.
 You can also use the <BR> tag to add blank lines between paragraphs. This is useful if you
want to add extra space above or below a block of text or a heading.
 Add a Line Break
1 Type <BR> in front of the line of text that you want to appear as a new line.
2 Type additional <BR> tags wherever you want a line break.
 Note: You do not need a closing tag for the <BR> tag.
 Example: <p> Ethiopia, one of the world's oldest nations, traces its history to ancient
civilizations like the Aksumite Empire (c. 100 AD). <br> It resisted colonial rule, defeated
Italy at Adwa (1896), and saw Emperor Haile Selassie’s rule before a 1974 revolution led to
the Derg <br> regime and later democracy.</P>
4. Insert a Blank Space
 You can insert blank spaces within a line of text to indent or add emphasis to your text. You
can also use blank spaces to help position an element on a Web page, such as a graphic or
photo.
 Insert a Blank Space
 Type &nbsp; in the line where you want to add a blank space.
 To add multiple spaces, type the code multiple times.
 Example: <p> &nbsp; &nbsp; &nbsp; &nbsp; Ethiopia, one of the world's oldest nations,
traces its history to ancient civilizations like the Aksumite Empire (c. 100 AD). It resisted
colonial rule, defeated Italy at Adwa (1896), and saw Emperor Haile Selassie’s rule before a
1974 revolution led to the Derg regime and later democracy.</P>
5. Insert Preformatted Text
 You can use the preformatted tags, <PRE> and </PRE>, to keep the line breaks and spaces
you enter for a paragraph or block of text. Web browsers ignore hard returns, line breaks,
and extra spaces between words unless you insert the preformatted tags. If you type a
paragraph with spacing just the way you want it, you can assign the preformatted tags to
keep the spacing in place.
 Insert Preformatted Text
1 Type <PRE> above the text you want to keep intact.
2 Type </PRE> below the text.
 Example: <p> Here’s the acronym COMPUTER in a list format: </p><br>
<pre>
C Common
O Oriented
M Machine
P Particularly
U Used for
T Technological
E Educational
R Research
</pre>
6. Insert a Heading
 You can use headings to help clarify information on a page, organize text, and create visual
structure. You can choose from six heading levels for a document, ranging from heading
level 1 (<H1>), the largest, to heading level 6 (<H6>), the smallest. Headings appear as
bold text on a Web page.
 Insert a Heading
1 Type <H?> in front of the text you want to turn into a heading, replacing? With the
heading level number you want to assign. You can set a heading level from 1 to 6.
2 Type </H?> at the end of the heading text, replacing? With the corresponding heading
level.
3 Type additional heading tags for any other text that you want to emphasize on the page.
 Example: <h1>Introduction to Computers</h1>
<h2>History of Computers</h2>
<h3>Generation of Computers</h3>
<h4>Branch of Computers</h4>
<h5>Categories of Computers</h5>
<h6>Types of Computers</h6>
7. Add Block Quotes
 You can use block quotes to set off a paragraph from the rest of the document page. Block
quotes are commonly used with quoted text or excerpts from other sources.
 Add Block Quotes
1 Type <BLOCKQUOTE> in front of the text you want to turn into a block quote.
2 Type </BLOCKQUOTE> at the end of the text.
 Example: <blockquote> Overcoming poverty is not a task of charity, it is an act of justice.
</blockquote>
8. Insert a Comment
 You can use comments to write notes to yourself within an HTML document. Comments do
not appear when a browser displays a Web page. For example, you might leave a comment
about a future editing task or leave a note to other Web developers viewing your HTML
source code.
 You can also place comments around HTML code to turn that code off. HTML tags inside
comments are not interpreted by the browser.
 Insert a Comment
1 Type <!- - where you want to place a comment.
2 Type the comment text.
3 Type - ->.
 Example: <!—add photo here -- >
9. Bold Text
 You can add bold formatting to your text to give it more emphasis or make your page more
visually appealing. For example, you might make a company name bold in a paragraph or
add bold to a list of items.ke Text Bold
 Make Text Bold
1 Type <B> in front of the text you want to make bold.
2 Type </B> at the end of the text.
10.Italicize Text
 You can add italics to your text to give it more emphasis or make your page more visually
appealing.
 Italicize Text
1 Type <I> in front of the text you want to italicize.
2 Type </I> at the end of the text.
11.Add Underlining to Text
 You can add underlining to your text for added emphasis.
 Add Underlining to Text
1 Type <U> in front of the text you want to underline.
2 Type </U> at the end of the text.
12.Add a Horizontal Line
 You can add a solid line, or horizontal rule, across your page to separate blocks of
information. Horizontal rules must occupy a line by themselves and cannot appear within a
paragraph.
 Add a simple line
1 Type <HR> where you want to insert a horizontal rule.
 Set a line thickness and width
1 Within the <HR> tag, type SIZE=”?”, replacing ? With the thickness you want to assign,
measured in pixels.
2 Within the <HR> tag, type WIDTH=”?%”, replacing ? with the percentage of the page you
want the rule to extend across. You can also set a numeric value to set the width of the rule in
pixels.

You might also like