Professional Documents
Culture Documents
SEMINAR 1
HTML is an acronym derived from Hypertext Markup Language, which is the name
of a language in which web pages are written. Web pages are HTML files with the
extension ".html" or ".htm". Being a markup language, HTML does not use
instructions (as Pascal, VB or C programming languages) or commands (like Fox
does), but labels, which are called balises, or tags.
Any HTML document begins with the tag <html> and ends with the tag </ html>.
By convention, all information starts with an open angle bracket "<" and ends with
an angle bracket ">". Tags of these brackets transmit commands to the browser to
display the page in a certain way.
A tag may have one or more attributes with certain values. For example, a tag with
two attributes is as follows:
</head>
<body>
…….. Document content
……..
……..
</body>
</html>
HTML is not case sensitive, meaning a label can be written both lowercase and
uppercase.
Example: <HTML> = <html> = <html>.
Characters "space" and "CR / LF" (carriage return & line feed = end of line and
new row) displayed between the beginning tag and the end tag of an HTML
element are ignored by the browser. For example, if you enter more lines in an
HTML document, the browser will display everything on one line, because the
characters "CR / LF" are ignored by the browser. Switching to a new line must be
an explicit command, which must appear on the html page. This command is given
by the <br> element (from "break row" - line break).
1
HTML
Save the source code as a file with the extension HTM or HTML (required). The
file will be saved in a known location.
File Save As
3. Find the file saved in step 2 with the Windows Explorer (the file will have
distinctive icon: ).
4. Run the file with the extension HTM or HTML (to see how the tags written
in Notepad are interpreted Internet) - double click on the file and it will open
in the default browser application.
If there is no mark "<" and ">" in the content of a web page, then the HTML parser
will interpret it as simple text and displays it accordingly on the screen.
The content of the element <title> ... </ title> will appear in the title bar of your
browser window. If this element is missing in an HTML page, then in the title bar
of the browser window the name of HTML file will appear.
Preformatted blocks
For the browser to correctly interpret the characters "space", "tab" and "CR / LF"
that must be displayed in an web page, this text should be included inside the
element <pre> ... </ pre>.
<html>
<head>
<title>Preformatted block </title>
</head>
<body><pre>
First line
Second line
Third line
2
HTML
</pre></body>
</html>
The color of the background of an webpage may be specified using the bgcolor
attribute of <body> HTML element. The following example creates an web page
with gray background.
<html>
<head>
<title>Background of the web page </title>
</head>
<body bgcolor=gray>
This is an web page with gray background!!!
</body>
</html>
3
HTML
Browsers automatically add some space (margin) before and after each <p>
element. The margins can be modified with CSS (with the margin
properties).
2. Title blocks
In a text, chapter headings can be entered using tags: <Hi>.......</Hi>, where
i may take values from 1 to 6. <h1>, <h2>, <h3>, <h4>, <h5>, <h6>.
<h1> defines the most important heading, <h6> defines the least important
heading.
<div style="color:#0000FF">
<h3>This is a heading of the document</h3>
<p>This is a paragraph inside this section.</p>
</div>
4
HTML
In order to group inline-elements inside a block of text the <span>…</span>
element may be used. It provides no visual change by itself. In exchange, it
provides a way to add a hook to a part of a text or a part of a document. When a
text is hooked in a <span> element, you can style it with CSS.
Example:
<p>I have a <span style="color:blue">difficult</span>
exam.</p>