SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Web Authoring

    Topic 5 –
 Text Formatting
Objectives
Students should able to:
Describe the function and use the
following text formatting tags:
       •   Paragraphs
       •   Headings
       •   Emphasis
       •   Line breaks
       •   Bold
       •   Italic
       •   Image source (Img Src)
Paragraph
The <p> tag defines a paragraph.
This tag places a blank line above and
below the text of the paragraph.
The web browser automatically
understands how to display the text
because of the paragraph tag.
 Example:
       <P> ... the text goes here ... </P>
Headings
The HTML header contains several
notable items which include:
1. doctype - This gives a description of the
type of HTML document this is.
2. meta name="description" - This gives a
description of the page for search engines.
3. title - Defines the name of your document
for your browser.
Headings
The header in our example document:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
 <html>
 <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-
8859-1">
<meta name="description" content="Comprehensive
Documentation and information about HTML.">
 <meta name="keywords" content="HTML, tags, commands">
<title>The CTDP HTML Guide</title>
 <link href="style.css" rel="stylesheet" type="text/css">
</head>
Emphasis
If you learned HTML before you learned
XHTML, you probably know about the bold
and italics tags.
But these tags are not semantic elements
because they define how the text should look
rather than information about the text.
They have been generally replaced by strong
(for bold) and emphasis (for italics).
Emphasis
Example:

<em>This text is emphasized</em> most
browsers display it as italics.

<strong>This text is strongly
emphasized</strong> most browsers display
it as bold.
Link Break
Line breaks are different from most of the
tags we have seen so far.
A line break ends the line you are
currently on and resumes on the next
line.
Placing <br /> within the code is the same
as pressing the return key in a word
processor. Use the <br /> tag within the
<p> (paragraph) tag.
Link Break
For example:

<p> Will Peterson<br />
Box 61<br />
Cleveland, Ohio<br />
</p>
Font
The <font> tag is used to add style, size,
and colour to the text on your site.
Use the size, colour, and face attributes
to customize your fonts.
Use a <basefont> tag to set all of your
text to the same size, face, and colour.
Font
Example: - set font size to 5

<p> <font size="5">Here is a size 5
font</font> </p>

Example: - set font colour to red
<p><font color="red">This text is red</font>
</p>
Underline
Underlines can be used to highlight and
emphasize text on web pages.
Text can be underlined using CSS style
sheets, with the text-decoration property, or,
with the HTML U element.
Example:

    <U> ... text to be underlined ... </U>
Preformatted Text
Preformatted text between the start and
end PRE tag is rendered using a fixed
with font, in addition whitespace
characters are treated literally.

The spacing and line breaks are rendered
directly.
Preformatted Text
For example, a verse from Shelley (To a
Skylark):

<PRE> Higher still and higher
         From the earth thou springest
      Like a cloud of fire;
         The blue deep thou wingest,
And singing still dost soar, and soaring ever
singest.</PRE>
Using <style> Tag
The <STYLE> tag is always inside the
header of the document, i.e. between the
<HEAD> Start and End Tags.

<HEAD>
    <TITLE>Bach's home page</TITLE>
    <STYLE type="text/css">
         H1 { color: blue }
    </STYLE>
</HEAD>

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

HTML HR
HTML HRHTML HR
HTML HR
 
Html
HtmlHtml
Html
 
Html 5
Html 5Html 5
Html 5
 
Markup language classification, designing static and dynamic
Markup language classification, designing static and dynamicMarkup language classification, designing static and dynamic
Markup language classification, designing static and dynamic
 
[Basic HTML/CSS] 1. html - basic tags
[Basic HTML/CSS] 1. html - basic tags[Basic HTML/CSS] 1. html - basic tags
[Basic HTML/CSS] 1. html - basic tags
 
Html Study Guide
Html Study GuideHtml Study Guide
Html Study Guide
 
Html9
Html9Html9
Html9
 
XHTML
XHTMLXHTML
XHTML
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Html 1
Html 1Html 1
Html 1
 
Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3
 
Html basic
Html basicHtml basic
Html basic
 
basic introduction of html tags
basic introduction  of html tagsbasic introduction  of html tags
basic introduction of html tags
 
Class2
Class2Class2
Class2
 
Intro To HTML
Intro To HTMLIntro To HTML
Intro To HTML
 
Html, Xml, 그리고 시맨틱웹
Html, Xml, 그리고 시맨틱웹Html, Xml, 그리고 시맨틱웹
Html, Xml, 그리고 시맨틱웹
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
HTML (Hyper Text Markup Language)
HTML (Hyper Text Markup Language)HTML (Hyper Text Markup Language)
HTML (Hyper Text Markup Language)
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 

Andere mochten auch

Web topic 10 2 web design basics
Web topic 10 2  web design basicsWeb topic 10 2  web design basics
Web topic 10 2 web design basicsCK Yang
 
Web topic 9 navigation and link
Web topic 9  navigation and linkWeb topic 9  navigation and link
Web topic 9 navigation and linkCK Yang
 
Web topic 8 listings in html
Web topic 8  listings in htmlWeb topic 8  listings in html
Web topic 8 listings in htmlCK Yang
 
Web topic 2 html
Web topic 2  htmlWeb topic 2  html
Web topic 2 htmlCK Yang
 
Web topic 4 style in html
Web topic 4  style in htmlWeb topic 4  style in html
Web topic 4 style in htmlCK Yang
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in htmlCK Yang
 
Web topic 7 html tags for links
Web topic 7  html tags for linksWeb topic 7  html tags for links
Web topic 7 html tags for linksCK Yang
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layoutCK Yang
 
Web topic 30 ensure web contents meet
Web topic 30   ensure web contents meetWeb topic 30   ensure web contents meet
Web topic 30 ensure web contents meetCK Yang
 
Web topic 24 usage of web browser
Web topic 24  usage of web browserWeb topic 24  usage of web browser
Web topic 24 usage of web browserCK Yang
 
Web topic 25 mobile optimized website
Web topic 25  mobile optimized websiteWeb topic 25  mobile optimized website
Web topic 25 mobile optimized websiteCK Yang
 
Web topic 23 web accessibility
Web topic 23  web accessibilityWeb topic 23  web accessibility
Web topic 23 web accessibilityCK Yang
 
Web topic 28. w3 c standards and guidelines
Web topic 28. w3 c standards and guidelinesWeb topic 28. w3 c standards and guidelines
Web topic 28. w3 c standards and guidelinesCK Yang
 
Web topic 14 cascading style sheets
Web topic 14  cascading style sheetsWeb topic 14  cascading style sheets
Web topic 14 cascading style sheetsCK Yang
 
Web topic 29 w3 c page validation
Web topic 29  w3 c page validationWeb topic 29  w3 c page validation
Web topic 29 w3 c page validationCK Yang
 
Web topic 32 validate web contents
Web topic 32  validate web contentsWeb topic 32  validate web contents
Web topic 32 validate web contentsCK Yang
 
Web topic 29 w3 c page validation
Web topic 29  w3 c page validationWeb topic 29  w3 c page validation
Web topic 29 w3 c page validationCK Yang
 
Web topic 1 internet
Web topic 1  internetWeb topic 1  internet
Web topic 1 internetCK Yang
 
Web topic 26 browser compatibilty and security
Web topic 26  browser compatibilty and securityWeb topic 26  browser compatibilty and security
Web topic 26 browser compatibilty and securityCK Yang
 
Web topic 33 publish websites
Web topic 33  publish websitesWeb topic 33  publish websites
Web topic 33 publish websitesCK Yang
 

Andere mochten auch (20)

Web topic 10 2 web design basics
Web topic 10 2  web design basicsWeb topic 10 2  web design basics
Web topic 10 2 web design basics
 
Web topic 9 navigation and link
Web topic 9  navigation and linkWeb topic 9  navigation and link
Web topic 9 navigation and link
 
Web topic 8 listings in html
Web topic 8  listings in htmlWeb topic 8  listings in html
Web topic 8 listings in html
 
Web topic 2 html
Web topic 2  htmlWeb topic 2  html
Web topic 2 html
 
Web topic 4 style in html
Web topic 4  style in htmlWeb topic 4  style in html
Web topic 4 style in html
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in html
 
Web topic 7 html tags for links
Web topic 7  html tags for linksWeb topic 7  html tags for links
Web topic 7 html tags for links
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
 
Web topic 30 ensure web contents meet
Web topic 30   ensure web contents meetWeb topic 30   ensure web contents meet
Web topic 30 ensure web contents meet
 
Web topic 24 usage of web browser
Web topic 24  usage of web browserWeb topic 24  usage of web browser
Web topic 24 usage of web browser
 
Web topic 25 mobile optimized website
Web topic 25  mobile optimized websiteWeb topic 25  mobile optimized website
Web topic 25 mobile optimized website
 
Web topic 23 web accessibility
Web topic 23  web accessibilityWeb topic 23  web accessibility
Web topic 23 web accessibility
 
Web topic 28. w3 c standards and guidelines
Web topic 28. w3 c standards and guidelinesWeb topic 28. w3 c standards and guidelines
Web topic 28. w3 c standards and guidelines
 
Web topic 14 cascading style sheets
Web topic 14  cascading style sheetsWeb topic 14  cascading style sheets
Web topic 14 cascading style sheets
 
Web topic 29 w3 c page validation
Web topic 29  w3 c page validationWeb topic 29  w3 c page validation
Web topic 29 w3 c page validation
 
Web topic 32 validate web contents
Web topic 32  validate web contentsWeb topic 32  validate web contents
Web topic 32 validate web contents
 
Web topic 29 w3 c page validation
Web topic 29  w3 c page validationWeb topic 29  w3 c page validation
Web topic 29 w3 c page validation
 
Web topic 1 internet
Web topic 1  internetWeb topic 1  internet
Web topic 1 internet
 
Web topic 26 browser compatibilty and security
Web topic 26  browser compatibilty and securityWeb topic 26  browser compatibilty and security
Web topic 26 browser compatibilty and security
 
Web topic 33 publish websites
Web topic 33  publish websitesWeb topic 33  publish websites
Web topic 33 publish websites
 

Ähnlich wie Web topic 5 text formatting

Ähnlich wie Web topic 5 text formatting (20)

html
htmlhtml
html
 
HTML
HTMLHTML
HTML
 
HTML.pdf
HTML.pdfHTML.pdf
HTML.pdf
 
Html Simple Tutorial
Html Simple TutorialHtml Simple Tutorial
Html Simple Tutorial
 
HTML-INTRO.pptx
HTML-INTRO.pptxHTML-INTRO.pptx
HTML-INTRO.pptx
 
intro-to-html
intro-to-htmlintro-to-html
intro-to-html
 
Html introduction
Html introductionHtml introduction
Html introduction
 
Html presentation
Html presentationHtml presentation
Html presentation
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
 
CSS notes
CSS notesCSS notes
CSS notes
 
WEB PROGRAMMING- Web page creation using HTML Tags
WEB PROGRAMMING-  Web page creation using HTML TagsWEB PROGRAMMING-  Web page creation using HTML Tags
WEB PROGRAMMING- Web page creation using HTML Tags
 
introduction to html.ppt
introduction to html.pptintroduction to html.ppt
introduction to html.ppt
 
SEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.inSEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.in
 
introdution-to-html.ppt
introdution-to-html.pptintrodution-to-html.ppt
introdution-to-html.ppt
 
HTML
HTMLHTML
HTML
 
Introduction to Html and Css.pdf
Introduction to Html and Css.pdfIntroduction to Html and Css.pdf
Introduction to Html and Css.pdf
 
Learning html. (Part- 1)
Learning html. (Part- 1)Learning html. (Part- 1)
Learning html. (Part- 1)
 
html
htmlhtml
html
 
html-basic.pdf
html-basic.pdfhtml-basic.pdf
html-basic.pdf
 

Mehr von CK Yang

Web topic 27 class test
Web topic 27  class testWeb topic 27  class test
Web topic 27 class testCK Yang
 
Web topic 31 setup remote site
Web topic 31  setup remote siteWeb topic 31  setup remote site
Web topic 31 setup remote siteCK Yang
 
Web topic 22 validation on web forms
Web topic 22  validation on web formsWeb topic 22  validation on web forms
Web topic 22 validation on web formsCK Yang
 
Web topic 21 pass info via javascript
Web topic 21  pass info via javascriptWeb topic 21  pass info via javascript
Web topic 21 pass info via javascriptCK Yang
 
Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html formsCK Yang
 
Web topic 20 1 html forms
Web topic 20 1  html formsWeb topic 20 1  html forms
Web topic 20 1 html formsCK Yang
 
Web topic 18 conflict resolution in css
Web topic 18  conflict resolution in cssWeb topic 18  conflict resolution in css
Web topic 18 conflict resolution in cssCK Yang
 
Web topic 17 font family in css
Web topic 17  font family in cssWeb topic 17  font family in css
Web topic 17 font family in cssCK Yang
 
Web topic 16 css workflow
Web topic 16  css workflowWeb topic 16  css workflow
Web topic 16 css workflowCK Yang
 
Web topic 15 2 basic css layout
Web topic 15 2  basic css layoutWeb topic 15 2  basic css layout
Web topic 15 2 basic css layoutCK Yang
 
Web topic 13 html validation tools
Web topic 13  html validation toolsWeb topic 13  html validation tools
Web topic 13 html validation toolsCK Yang
 
Web topic 11 importance of html validation
Web topic 11  importance of html validationWeb topic 11  importance of html validation
Web topic 11 importance of html validationCK Yang
 

Mehr von CK Yang (12)

Web topic 27 class test
Web topic 27  class testWeb topic 27  class test
Web topic 27 class test
 
Web topic 31 setup remote site
Web topic 31  setup remote siteWeb topic 31  setup remote site
Web topic 31 setup remote site
 
Web topic 22 validation on web forms
Web topic 22  validation on web formsWeb topic 22  validation on web forms
Web topic 22 validation on web forms
 
Web topic 21 pass info via javascript
Web topic 21  pass info via javascriptWeb topic 21  pass info via javascript
Web topic 21 pass info via javascript
 
Web topic 20 2 html forms
Web topic 20 2  html formsWeb topic 20 2  html forms
Web topic 20 2 html forms
 
Web topic 20 1 html forms
Web topic 20 1  html formsWeb topic 20 1  html forms
Web topic 20 1 html forms
 
Web topic 18 conflict resolution in css
Web topic 18  conflict resolution in cssWeb topic 18  conflict resolution in css
Web topic 18 conflict resolution in css
 
Web topic 17 font family in css
Web topic 17  font family in cssWeb topic 17  font family in css
Web topic 17 font family in css
 
Web topic 16 css workflow
Web topic 16  css workflowWeb topic 16  css workflow
Web topic 16 css workflow
 
Web topic 15 2 basic css layout
Web topic 15 2  basic css layoutWeb topic 15 2  basic css layout
Web topic 15 2 basic css layout
 
Web topic 13 html validation tools
Web topic 13  html validation toolsWeb topic 13  html validation tools
Web topic 13 html validation tools
 
Web topic 11 importance of html validation
Web topic 11  importance of html validationWeb topic 11  importance of html validation
Web topic 11 importance of html validation
 

Web topic 5 text formatting

  • 1. Web Authoring Topic 5 – Text Formatting
  • 2. Objectives Students should able to: Describe the function and use the following text formatting tags: • Paragraphs • Headings • Emphasis • Line breaks • Bold • Italic • Image source (Img Src)
  • 3. Paragraph The <p> tag defines a paragraph. This tag places a blank line above and below the text of the paragraph. The web browser automatically understands how to display the text because of the paragraph tag. Example: <P> ... the text goes here ... </P>
  • 4. Headings The HTML header contains several notable items which include: 1. doctype - This gives a description of the type of HTML document this is. 2. meta name="description" - This gives a description of the page for search engines. 3. title - Defines the name of your document for your browser.
  • 5. Headings The header in our example document: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso- 8859-1"> <meta name="description" content="Comprehensive Documentation and information about HTML."> <meta name="keywords" content="HTML, tags, commands"> <title>The CTDP HTML Guide</title> <link href="style.css" rel="stylesheet" type="text/css"> </head>
  • 6. Emphasis If you learned HTML before you learned XHTML, you probably know about the bold and italics tags. But these tags are not semantic elements because they define how the text should look rather than information about the text. They have been generally replaced by strong (for bold) and emphasis (for italics).
  • 7. Emphasis Example: <em>This text is emphasized</em> most browsers display it as italics. <strong>This text is strongly emphasized</strong> most browsers display it as bold.
  • 8. Link Break Line breaks are different from most of the tags we have seen so far. A line break ends the line you are currently on and resumes on the next line. Placing <br /> within the code is the same as pressing the return key in a word processor. Use the <br /> tag within the <p> (paragraph) tag.
  • 9. Link Break For example: <p> Will Peterson<br /> Box 61<br /> Cleveland, Ohio<br /> </p>
  • 10. Font The <font> tag is used to add style, size, and colour to the text on your site. Use the size, colour, and face attributes to customize your fonts. Use a <basefont> tag to set all of your text to the same size, face, and colour.
  • 11. Font Example: - set font size to 5 <p> <font size="5">Here is a size 5 font</font> </p> Example: - set font colour to red <p><font color="red">This text is red</font> </p>
  • 12. Underline Underlines can be used to highlight and emphasize text on web pages. Text can be underlined using CSS style sheets, with the text-decoration property, or, with the HTML U element. Example: <U> ... text to be underlined ... </U>
  • 13. Preformatted Text Preformatted text between the start and end PRE tag is rendered using a fixed with font, in addition whitespace characters are treated literally. The spacing and line breaks are rendered directly.
  • 14. Preformatted Text For example, a verse from Shelley (To a Skylark): <PRE> Higher still and higher From the earth thou springest Like a cloud of fire; The blue deep thou wingest, And singing still dost soar, and soaring ever singest.</PRE>
  • 15. Using <style> Tag The <STYLE> tag is always inside the header of the document, i.e. between the <HEAD> Start and End Tags. <HEAD> <TITLE>Bach's home page</TITLE> <STYLE type="text/css"> H1 { color: blue } </STYLE> </HEAD>