CP2-Q1 Module 2
CP2-Q1 Module 2
(.NET TECHNOLOGY) 2
Second Semester
Quarter 1 Module 2
Name of Student:
Specific Objectives:
WHAT I At the end of the lesson, you should achieve the following objectives:
NEED
TO KNOW 1. Identify the different HTM Headings.
2. Understand the use of HTM Styles
3. Comprehend HTML text formatting elements.
WHAT I KNOW
WHAT’S NEW
1
WHAT IS IT
HTML Headings
HTML headings are titles or subtitles that you want to display on a webpage.
Note: Browsers automatically add some white space (a margin) before and after a heading.
Headings Are Important
Search engines use the headings to index the structure and content of your web pages.
Users often skim a page by its headings. It is important to use headings to show the
document structure.
<h1> headings should be used for main headings, followed by <h2> headings, then
the less important <h3>, and so on.
Note: Use HTML headings for headings only. Don't use headings to make
text BIG or bold.
Bigger Headings
Each HTML heading has a default size. However, you can specify the size for any
heading with the style attribute, using the CSS font-size property:
2
HTML Paragraphs
A paragraph always starts on a new line, and is usually a block of text.
The HTML <p> element defines a paragraph.
A paragraph always starts on a new line, and browsers automatically add some white
space (a margin) before and after a paragraph.
HTML Display
You cannot be sure how HTML will be displayed.
Large or small screens, and resized windows will create different results.
With HTML, you cannot change the display by adding extra spaces or extra lines in
your HTML code.
The browser will automatically remove any extra spaces and lines when the page is
displayed:
The <hr> tag is an empty tag, which means that it has no end tag.
HTML Line Breaks
The HTML <br> element defines a line break.
Use <br> if you want a line break (a new line) without starting a new paragraph:
3
The <br> tag is an empty tag, which means that it has no end tag.
The Poem Problem
This poem will display on a single line:
HTML Styles
The HTML style attribute is used to add styles to an element, such as color, font, size,
and more.
4
The HTML Style Attribute
Setting the style of an HTML element, can be done with the style attribute.
The HTML style attribute has the following syntax:
Background Color
•The CSS background-color property defines the background color for an HTML
element.
Text Color
The CSS color property defines the text color for an HTML element:
Fonts
The CSS font-family property defines the font to be used for an HTML element:
Text Size
The CSS font-size property defines the text size for an HTML element:
5
Text Alignment
The CSS text-align property defines the horizontal text alignment for an HTML element:
6
HTML <small> Element
The HTML <small> element defines smaller text:
7
HTML <sup> Element
The HTML <sup> element defines superscript text. Superscript text appears half a
character above the normal line, and is sometimes rendered in a smaller font.
Superscript text can be used for footnotes, like WWW[1]:
8
HTML <abbr> for Abbreviations
The HTML <abbr> tag defines an abbreviation or an acronym, like "HTML", "CSS",
"Mr.", "Dr.", "ASAP", "ATM".
Marking abbreviations can give useful information to browsers, translation systems
and search-engines.
Tip: Use the global title attribute to show the description for the
abbreviation/acronym when you mouse over the element.
9
HTML Quotation and Citation Elements
WHAT’S MORE
WHAT I CAN DO
⏹️ <b>
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
⏹️ <strong>
____________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________
⏹️ <ins>
____________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________
10
WHAT I CAN SHOW
10