Hypertext Markup Language: HTML Css
Hypertext Markup Language: HTML Css
properties
background
element properties right Style
top
properties
edge
COLOR
Style
right
text
line
display
div
box font body must
VALUE width
padding
user
FLOAT
user
text
auto normal
element
Style COLOR
bottom
flow
height auto border COLOR
user
text
normal font text auto
text
HyperText
Markup Language
HTML&CSS
text
properties
VALUE
margin
text
auto
properties
box
normal
text
flow
user
COLOR COLOR
COLORdiv height
line FLOAT
font left display
background
edge
background background
attribute
Style div
properties
text
user user
div
text text
VALUE
COLOR
must
user
auto
FLOAT
width
font box
normal
element
bottom
font body
text
height left right border VALUE
text
user
COLOR
COLOR font
flow text
auto
text
auto
text
right
attribute left border text
Style right Style
top
top
left right
COLOR
COLOR
attribute
display
Style box
background
Style
top
COLOR
display
COLOR
line
normal
edge
margin
FLOAT
Contents
Text Formatting with HTML....................................................3
Block and Inline Tags.................................................................4
Tags of physical and logical formatting...................................8
Deprecated tags and attributes...............................................12
Character Entities in HTML. Using Them
in an HTML Page.....................................................................16
Copyright or Trademark Signs...........................................17
Using spaces and hyphens..................................................18
The Use of Entities...............................................................22
CSS properties for text formatting.........................................26
Home Assignment....................................................................36
Assignment................................................................................37
HTML Special Entities.............................................................37
Block tags...................................................................................46
Inline tags..................................................................................61
2
Text Formatting with HTML
3
Lesson 2. Text formatting by means of HTML
4
Block and Inline Tags
and <ins>, then most likely they will be placed in the <p> tag,
which will be parent for them. Tags <del> and <ins> will be
called nested, or child in this case.
Which elements apply to each of the categories?
Block Elements
Tag Tag Assignment
html Root tag
body Document body
h1-h6 Header tags
p Paragraph
div Content block
address Address
article Article
aside Side column
nav Navigation on the page
main The main content of the web page
header The top of the page or section
footer The bottom of the page, section or block quotation
section Page section
audio Insert audio
video Insert video
blockquote Block quotation
caption Table header
colgroup Defines the column group of a table
table Table
thead, tbody,
To select row groups of a table
tfoot
form To create a form
datalist Content for filling out the form field
select Drop-down list
fieldset Form field group
legend Header for fieldset
dl, ul, ol List tags
5
Lesson 2. Text formatting by means of HTML
Inline Elements
Tag Tag Assignment
a Link
abbr Abbreviation
b, strong Bold text
i, em Italic text
dfn Definition
br Line break
button, input, The button, the text field and the text area - the form
textarea, elements
label Label for the form element
cite Title of work, reference to source
code To highlight program code
kbd Code input from the keyboard
samp An example of outputting something in a computer
program
var Variable in any program
col Column in the table
del Text that has been deleted
ins The text that was added (often follow the <del> tag)
s Strikethrough text, i.e. text that is not already correct
or reliable. It's better to use the <del>
6
Block and Inline Tags
7
Lesson 2. Text formatting by means of HTML
8
Tags of physical and logical formatting
9
Lesson 2. Text formatting by means of HTML
10
Tags of physical and logical formatting
11
Lesson 2. Text formatting by means of HTML
Deprecated tags
and attributes
HTML, as the hypertext markup language, was repeatedly
changed and had a number of standards, in which one tags
were introduced and the use of others was abolished. HTML5
standard introduced many new tags, but some of those that
were popular in previous versions of HTML were defined as
obsolete or deprecated. Thus, the use of such tags is highly
recommended in your document that supports the HTML5
standard, otherwise the document will not pass validation.
Let me remind you that the browser determines which
standard your document belongs to by DOCTYPE, which is
specified at the very beginning of the markup, and it looks
like this for HTML5:
<!DOCTYPE html>
12
Deprecated tags and attributes
13
Lesson 2. Text formatting by means of HTML
14
Deprecated tags and attributes
If you look closely at this list, you can conclude that those
tags and attributes have become deprecated, the need for
which either has disappeared, or they can be replaced with
css-properties.
Related Links:
■■ https://developer.mozilla.org/en-US/docs/Web/HTML/
Element;
■■ https://html.com/html5/#Deprecated_Features_in_
HTML5;
■■ https://html.com/invalid-html/#HTML_Elements_to_
Stop_Using_Immediately.
15
Lesson 2. Text formatting by means of HTML
Character Entities
in HTML. Using Them
in an HTML Page
You may have encountered characters in Word
documents. They are usually not on the keyboard, but
are inserted using a special menu item. For example,
you cannot type the copyright character © or the arrow
characters (↓ or ↑). The same situation is in HTML: some
characters can either be copied from the text in the same
Word, or added using special codes. Character entities have
2 syntax options — in the form of parts of English words or
numbers, which necessarily begin with the ampersand (&)
and end with a semicolon (;). You can use any of the options,
but note that without a named code character entities can
be displayed not completely or be displayed incorrectly in
different browsers.
For example, the copyright symbol © can be represented
as a character entity © or ©
In the text editor you will see a set of characters, and on
the html-page they will represent only one character.
You will find tables of various characters divided by
category in the addendum of this lesson. It should be noted
that most of them, most likely, will never be used, but there
are a number of characters, which should be known by heart,
since you will apply them in different situations.
16
Character Entities in HTML. Using Them in an HTML Page
17
Lesson 2. Text formatting by means of HTML
18
Character Entities in HTML. Using Them in an HTML Page
19
Lesson 2. Text formatting by means of HTML
<html lang="ru">
…
<style>
.hyphens {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
</style>
20
Character Entities in HTML. Using Them in an HTML Page
21
Lesson 2. Text formatting by means of HTML
22
Character Entities in HTML. Using Them in an HTML Page
23
Lesson 2. Text formatting by means of HTML
code {
white-space: pre;
}
And we see that all the spaces, tabs, and line breaks are
displayed on the html page.
24
Character Entities in HTML. Using Them in an HTML Page
25
Lesson 2. Text formatting by means of HTML
CSS properties
for text formatting
Today, we'll look at the properties that are used to break
lines, to form intervals between characters or words, and to
design a text.
1. The white-space property is responsible for displaying
the spaces between words. By default, the value normal sets
automatic word wraps when the right edge of the browser or
the parent block is reached.
white-space: normal | nowrap | pre | pre-line | pre-wrap
26
CSS properties for text formatting
27
Lesson 2. Text formatting by means of HTML
28
CSS properties for text formatting
29
Lesson 2. Text formatting by means of HTML
30
CSS properties for text formatting
31
Lesson 2. Text formatting by means of HTML
32
CSS properties for text formatting
text-decoration: text-decoration-line |
text-decoration-style |text-decoration-color
33
Lesson 2. Text formatting by means of HTML
34
CSS properties for text formatting
Emmet: ts
35
Lesson 2. Text formatting by means of HTML
Home Assignment
In the homework you will need to format the text of
the article (use the <article> tag) using different tags and
css-styles. Note that the font on the page is sans serif, and
the size of the article is reduced in comparison with the size
of the browser. At the moment we will not consider in detail
how to do this, but simply use the following css properties:
article {
width: 90%;
margin: auto;
}
36
Assignment
Assignment
HTML SPECIAL ENTITIES
Trademarks & Copyright
© © © Copyright Sign
® ® ® Registered Trademark
™ ™ ™ Trademark
Currency Signs
€ € € Euro
¢ ¢ ¢ Cent
37
Lesson 2. Text formatting by means of HTML
Quotation Signs
" " " Double Quotes
& & & Ampersand
« « « Double Left-Pointing Angle Quotation Mark
» » » Double Right-Pointing Angle Quotation Mark
‹ ‹ Single Left-Pointing Angle Quotation Mark
› › Single Right-Pointing Angle Quotation Mark
′ ′ ′ Prime
″ ″ ″ Double Prime
‘ ‘ ‘ Left Single Quotation Mark
’ ’ ’ Right Single Quotation Mark
‚ ‚ ‚ Single Low-9 Quotation Mark
“ “ “ Left Double Quotation Mark
” ” ” Right Double Quotation Mark
„ „ „ Double Low-9 Quotation Mark
Markers
• • • Bullet
○ ○ White Circle
· · · Middle Dot
† † Dagger
‡ ‡ Double Dagger
♠ ♠ ♠ Spades
♣ ♣ ♣ Clubs
♥ ♥ ♥ Hearts
♦ ♦ ♦ Diamonds
38
Assignment. Цвета в Web-дизайне
Mathematical Signs
× × × Multiplication
÷ ÷ ÷ Division
< < < Less Than Sign
> > > Greater Than Sign
± ± ± Plus/Minus
¹ ¹ ¹ Superscript 1
² ² ² Superscript 2
³ ³ ³ Superscript 3
¬ ¬ ¬ Not Sign
¼ ¼ ¼ Fraction One Quarter
½ ½ ½ Fraction One Half
¾ ¾ ¾ Fraction Three Quarters
⁄ frasl; ⁄ Fraction Slash
− minus; − Minus
≤ ≤ ≤ Less-Than Or Equal To
≥ ≥ ≥ Greater-Than Or Equal To
≈ ≈ ≈ Almost Equal To
≠ ≠ ≠ Not Equal To Sign
≡ ≡ ≡ Identical To
√ √ √ Square Root
∞ ∞ ∞ Infinity
∑ ∑ ∑ N-Ary Summation
∏ ∏ ∏ N-Ary Product
39
Lesson 2. Text formatting by means of HTML
Arrows
← ← ← Left Arrow
↑ ↑ ↑ Up Arrow
→ → → Right Arrow
↓ ↓ ↓ Down Arrow
↔ ↔ ↔ Left-Right Arrow
↕ ↕ Up-Down Arrow
↵ ↵ ↵ Down Arrow With Corner Left
40
Assignment. HTML Special Entities
Stars, snowflakes
☃ Snowman
❄ Snowflake
❅ Tight Trifoliate Snowflake
❆ Heavy Chevron Snowflake
★ Black Star
☆ White Star
✪ Circled White Star
✫ Open Centre Black Star
✯ Pinwheel Star
⚝ Outlined White Star
⚪ Medium White Circle
⚫ Medium Black Circle
⚹ Sextile
✵ Eight Pointed Pinwheel Star
❉ Balloon-Spoked Asterisk
❋ Heavy Eight Teardrop-Spoked Propeller Asterisk
✺ Sixteen Pointed Asterisk
✹ Twelve Pointed Black Star
41
Lesson 2. Text formatting by means of HTML
Clocks, Time
⏰ Alarm Clock
⌚ Watch
⌛ ⌛ Hourglass
⌛ ⏳ Hourglass With Flowing Sand
Greek Alphabet
Lowercase Uppercase
Description
Symbol HTML-code Symbol HTML-code
α α Α Α Alpha
β β Β Β Beta
γ γ Γ Γ Gamma
δ δ Δ Δ Delta
ε ε Ε Ε Epsilon
ζ ζ Ζ Ζ Zeta
η η Η Η Eta
θ θ Θ Θ Theta
ι ι Ι Ι Iota
κ κ Κ Κ Kappa
42
Assignment. HTML Special Entities
Lowercase Uppercase
Description
Symbol HTML-code Symbol HTML-code
λ λ Λ Λ Lambda
μ μ Μ Μ Mu
ν ν Ν Ν Nu
ξ ξ Ξ Ξ Xi
ο ο Ο Ο Omicron
π π Π Π Pi
ρ ρ Ρ Ρ Rho
σ σ Σ Σ Sigma
ς ς Final Sigma
τ τ Τ Τ Tau
υ υ Υ Υ Upsilon
φ φ Φ Φ Phi
χ χ Χ Χ Chi
ψ ψ Ψ Ψ Psi
ω ω Ω Ω Omega
Латинский алфавит
Lowercase Uppercase
Sym HTML- Sym HTML- Description
Code Code
bol code bol code
à à à À À À A With Grave
á á á Á Á Á A With Acute
â â â Â Â Â A With Circumflex
ã ã ã Ã Ã Ã A With Tilde
ä ä ä Ä Ä Ä A With Diaeresis
å å å Å Å Å A With Ring Above
æ æ æ Æ Æ Æ AE symbols
ç ç ç Ç Ç Ç C With Cedilla
è è è È È È E With Grave
é é é É É É E With Acute
43
Lesson 2. Text formatting by means of HTML
Lowercase Uppercase
Sym HTML- Sym HTML- Description
Code Code
bol code bol code
ê ê ê Ê Ê Ê E With Circumflex
ë ë ë Ë Ë Ë E With Diaeresis
ì ì ì Ì Ì Ì I With Grave
í í í Í Í Í I With Acute
î î î Î Î Î I With Circumflex
ï ï ï Ï Ï Ï I With Diaeresis
ð ð ð Ð Ð Ð Eth (D with dash)
ñ ñ ñ Ñ Ñ Ñ N With Tilde
ò ò ò Ò Ò Ò O With Grave
ó ó ó Ó Ó Ó O With Acute
ô ô ô Ô Ô Ô O With Circumflex
õ õ õ Õ Õ Õ O With Tilde
ö ö ö Ö Ö Ö O With Diaeresis
÷ ÷ ÷ × × × Multiplication Sign
ø ø ø Ø Ø Ø O With Stroke
ù ù ù Ù Ù Ù U With Grave
ú ú ú Ú Ú Ú U With Acute
û û û Û Û Û U With Circumflex
ü ü ü Ü Ü Ü U With Diaeresis
ý ý ý Ý Ý Ý Y With Acute
Þ Þ Þ THORN
ƒ ƒ ƒ Latin Small Letter F With Hook- Florin
œ œ œ Œ Œ Œ Ligature OE
š š š Š Š Š S With Caron
Ÿ Ÿ Ÿ Y With Diaeresis
Cards
♠ ♠ ♠ Spades
♣ ♣ ♣ Clubs
44
Assignment. HTML Special Entities
Zodiac Signs
♈ ♈ Aries
♉ ♉ Taurus
♊ ♊ Gemini
♋ ♋ Cancer
♌ ♌ Leo
♍ ♍ Virgo
♎ ♎ Libra
♏ ♏ Scorpio
♐ ♐ Sagittarius
♑ ♑ Capricorn
♒ ♒ Aquarius
♓ ♓ Pisces
Chess Symbols
♔ ♔ White Chess King
♕ ♕ White Chess Queen
♖ ♖ White Chess Rook
♗ ♗ White Chess Bishop
♘ ♘ White Chess Knight
♙ ♙ White Chess Pawn
♚ ♚ Black Chess King
♛ ♛ Black Chess Queen
♜ ♜ Black Chess Rook
♝ ♝ Black Chess Bishop
♞ ♞ Black Chess Knight
♟ ◻ Black Chess Pawn
45
Lesson 2. Text formatting by means of HTML
BLOCK TAGS
<address> Text </address>
Attribute: universal.
Description:
Used to display contact information about the author of
this article or site and can include such HTML-elements as
links, address, author's name, and other text reporting some
author’s data.
If the <address> tag is inside the <body>, then the data
refers to the entire document, if it is inside the <article> tag,
then the information applies to the author of the article.
By default, the text inside the <address> container is
displayed in italics.
Example:
<address>
<p>24 Gimnazicheskaya Embankmen,
room 32<br>Kharkow, 61000</p>
<p>Tel.: (057) 752-33-22</p>
<p>Email: [email protected]</p>
</address>
46
Assignment. Block tags
<blockquote cite="https://citaty.info/quote/554">
"You should never ask anyone for anything.
Never- and especially from those who are more
powerful than yourself. They will make the offer
and they will give of their own accord"
<footer>Mikhail Bulgakov</footer>
</blockquote>
47
Lesson 2. Text formatting by means of HTML
<div class="block">
Lorem ipsum dolor sit amet, consectetur adipisicing
elit. Adipisci iure, deserunt tenetur facilis earum
veritatis.
</div>
<div class="block">
Veniam mollitia minus ab, hic, sint illo inventore
neque quod perspiciatis explicabo. A, impedit,
earum.
</div>
48
Assignment. Block tags
49
Lesson 2. Text formatting by means of HTML
<section>
<h2>About Program</h2>
<p>The program "Limitless Audit" was created by
a group of developers from Ukraine.…</p>
</section>
50
Assignment. Block tags
51
Lesson 2. Text formatting by means of HTML
52
Assignment. Block tags
53
Lesson 2. Text formatting by means of HTML
<aside>
<nav>
<a href="#">Menu Item 1</a><br>
<a href="#">Menu Item 2</a><br>
<a href="#">Menu Item 3</a><br>
<a href="#">Menu Item 4</a><br>
</nav>
54
Assignment. Block tags
<article>
<h4>Comment</h4>
<p>Very interesting site with Lorem ipsum
content. That's great...</p>
</article>
</aside>
55
Lesson 2. Text formatting by means of HTML
Example:
<section id="about">
<h2>About Program</h2>
<p>The program "Limitless Audit" was created by
a group of developers from Ukraine.</p>
<p>It has no analogues in the CIS, since it takes
into account the requirements of the law, and can
be changed in accordance with the latest changes
in the tax code.</p>
<p>The program "Limitless Audit" was created after
the detailed analysis of modern tax situation in
the former-Soviet society.</p>
</section>
56
Assignment. Block tags
<footer>
<p class="copyright">©
2017 Audit Systems LLC ™</p>
</footer>
57
Lesson 2. Text formatting by means of HTML
Example:
<pre>
Sale!!!
Sale!!
Sale!
58
Assignment. Block tags
<nav>
<a href="#about">О программе</a>
<a href="#prices">Цены</a>
<a href="#contact">Контакты</a>
</nav>
59
Lesson 2. Text formatting by means of HTML
60
Assignment. Inline tags
INLINE TAGS
<abbr> Text </abbr>
Attribute: Title — a tooltip for full decryption, which becomes
active when you move the cursor over the abbreviation text.
Recommended for screen readers and search engines.
Description:
Required to indicate an abbreviation or acronym
(established abbreviations). By default, the characters in this
tag with the title attribute are underlined with a dashed line.
Example:
<abbr title="Cascading Style Sheets">CSS</abbr>
allows you to change the style of any logic
formatting tag easily!
61
Lesson 2. Text formatting by means of HTML
62
Assignment. Inline tags
63
Lesson 2. Text formatting by means of HTML
Example:
64
Assignment. Inline tags
65
Lesson 2. Text formatting by means of HTML
It also makes sense to use the <q> tag to create styles for
citations using CSS on specialized sites.
Example:
<p>Mikhail Bulgakov: <q cite="http://masterimargo.ru/
quote.html">But what can be done, the one who loves
must share the fate of the one he loves</q>.</p>
66
Assignment. Inline tags
<p><code>
var picHolder = document.getElementById(
"picHolder" ); <br>
var img = document.createElement("img");<br>
img.src = "images/stone3.jpg";<br>
picHolder.appendChild(img);
</code>
</p>
67
Lesson 2. Text formatting by means of HTML
In the browser, the text in the <del> tag looks crossed out.
It is intended to highlight the text that was added to the new
version of the document. The tag allows you to track changes in
the text of the document compared to the old version.
In the browser, the text in the <ins> tag looks underlined.
Example:
68
Assignment. Inline tags
69
Lesson 2. Text formatting by means of HTML
70
Assignment. Inline tags
This text will be smaller than the main text, and is located
lower than the base line of the characters in the string. Most
often used for formulas.
Can be replaced with the css-property vertical-align
Example:
71
Lesson 2. Text formatting by means of HTML
72
Assignment. Inline tags
<span>...</span>
Attribute: universal.
Description:
It is intended for selection of elements inside the main
text of block elements basically in order to set css-formatting
for a small amount of the text. Therefore, such attributes are
most often set for it:
■■ style — style of element
■■ class — class of styles
■■ id — unique identifier
Example:
<p><span class="red">М</span>ikhail
<span class="red">B</span>ulgakov:
73
Lesson 2. Text formatting by means of HTML
<q cite="https://www.goodreads.com/author/quotes/
3873.Mikhail_Bulgakov">But what can be done, the one
who loves must share the fate of the one he loves
</q>.</p>
74
Assignment. Inline tags
75
Lesson 2.
Text formatting by means of HTML
© Elena Slutskaya.
© STEP IT Academy, www.itstep.org.
All rights to protected pictures, audio, and video belong to their authors or legal
owners.
Fragments of works are used exclusively in illustration purposes to the extent
justified by the purpose as part of an educational process and for educational
purposes in accordance with Article 1273 Sec. 4 of the Civil Code of the Russian
Federation and Articles 21 and 23 of the Law of Ukraine “On Copyright and Related
Rights”. The extent and method of cited works are in conformity with the standards,
do not conflict with a normal exploitation of the work, and do not prejudice the
legitimate interests of the authors and rightholders. Cited fragments of works can
be replaced with alternative, non-protected analogs, and as such correspond the
criteria of fair use.
All rights reserved. Any reproduction, in whole or in part, is prohibited. Agreement
of the use of works and their fragments is carried out with the authors and other
right owners. Materials from this document can be used only with resource link.
Liability for unauthorized copying and commercial use of materials is defined
according to the current legislation of Ukraine.