Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
LABORATORY 3 theory.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
565.25 Кб
Скачать

Introduction in html 3

HTML is intended for creation of the documents placed on Web servers, access to which to be made by means of Internet. The HTML document may be looked through by means of the browser (for example, Internet Explorer, Mozilla FireFox, Opera). The HTML document is a usual text file, which containing information, and commands - tags (Tag – a label, a sign), which specify how the browser will display the document. HTML – a page can be created by means of the Notepad.

E xample.

<html>

<head>

<title> Это простейшая страничка

</title>

</head>

<body>

Привет! Добро пожаловать на мою страничку!!!

</body>

</html>

Save the file with name suffix .htm or .html. Open this saved file. For return to a page code, do the following: press the View menu and there choose command – HTML code Viewing.

There are two types of tags: opening and closed.

For example, <html> - opening, </html> - closed

  1. Basic Tags

Tag

Description

<html>

Defines an HTML document

<title>

Defines a title for the document

<body>

Defines the document's body

<h1> to <h6>

Defines HTML headings

<p>

Defines a paragraph

<br>

Inserts a single line break

<hr>

Inserts the continuous line

<!--...-->

Defines a comment

The <BODY> tag has attributes:

Attribute

Value

Description

alink

color

Specifies the color of an active link in a document

background

URL

Specifies a background image for a document

bgcolor

color

Specifies the background color of a document

link

color

Specifies the color of unvisited links in a document

text

color

Specifies the color of the text in a document

vlink

color

Specifies the color of visited links in a document

Example.

<html>

<head>

<title> Пример </title>

<body bgcolor = yellow text = red> Фон желтый, а текст красный

</body>

</html>

<P>, <H1..Н6> tags have parameters:

Attribute

Value

Description

align

left right center justify

Specifies the alignment of the text within a paragraph

Example.

<h1 align = center> Глава 1 </h1>.

  1. Tags of formatting

Tag

Description

<abbr>

Defines an abbreviation

<address>

Defines contact information for the author/owner of a document/article

<b>

Defines bold text

<blockquote>

Defines a section that is quoted from another source

<center>

Defines centered text

<code>

Defines a piece of computer code

<font>

Defines font, color, and size for text

<i>

Defines italics text

<kbd>

Defines keyboard input

<pre>

Defines preformatted text

<samp>

Defines sample output from a computer program

<small>

Defines smaller text

<strike>

Defines strikethrough text

<strong>

Defines important text

<sub>

Defines subscripted text

<sup>

Defines superscripted text

<tt>

Defines teletype text

<u>

Defines the text underlined

<var>

Defines a variable

The <FONT> tag has parameters:

Attribute

Value

Description

color

rgb(x,x,x) #xxxxxx colorname

Specifies the color of text

face

font_family

Specifies the font of text

size

number

Specifies the size of text

Example.

<font size =5>Привет!</font> Это моя домашняя страничка. < font size =+2>(комментарии)</ font>

<font face ="Times New Roman, Arial, Courier New">Это моя домашняя страничка.</font>

Color table

Color name

Code

Color name

Code

Black

# 000000

Maroon

# 800000

Green

# 008000

Navy

# 000080

Silver

# C0C0C0

Red

# FF0000

Lime

# 00FF00

Blue

# 0000FF

Gray

# 808080

Purple

# 800080

Olive

# 808000

Teal

# 008080

White

# FFFFFF

Fuchsia

# FF00FF

yellow

# FFFF00

Aqua

# 00FFFF

Example.

Текст <Font color = red> красного </Font> цвета

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]