Sei sulla pagina 1di 7

HTML introduction

HTML is not a programming language (like the C++), it is more syntax language
for formatting documents. He origin from SGML (Standard Generalized Markup
Language) which is more complexed meta language. Most important
specification which HTML allows is formatting HTML documents separately from
style sheet, simple document scripting which has more control under HTML
elements.
Basic structure of HTML page is:
<html>
<head>
<title> Page title </title>
<meta http-equiv=content type content=text/html; charset=utf-8>
</head>
<body>
</body>
</html>
<html></html> This marks are used on the beginning and the end of document.
Between them are other marks that are for describing the page.
<title><meta> These tags are used for title, description, key words, name of
author Above all information in header will be displayed only title.
<head> This is required element of any HTML document
<body> This tag is the beginning and the end of page body which includes content
to be displayed.
DOCTYPE definition is required part of any Web page. It is not a tag. It is
instruction that tells to Web browser which HTML version is used for creating Web
pages and it is necessarily so Web browser can interpret correctly the Web page.
HTML text control
Unformatted text represent content added to HTML document where is not used
HTML marks for formatting text. When text in Web document is not formatted,
windows width determines number of word displayed in each line on display. Web
browser does not recognize marks such as CTRL or ENTER which are used in text
documents. So when we add an unformatted text in a HTML document, it is not
important look of that document because browser does not recognize CTRL or
ENTER marks like regular tool for formatting.
Example:
<html>
<head>
<title> Example of unformatted text </title>
</head>
<body>
This is an example of unformatted text. It is not important if you use CTRL or
ENTER because they cannot be recognized.
</body>
</html>
For control formatting we use <p> tag. This tag marks end of one and beginning of
next paragraph. It tells to browser to put a empty line and than to start a new
paragraph in next line. Tag for entering next line is <br/>. You can visit this link to
see how it works.
HTML lists
There are 3 types of lists:
Arranged they use numbers for listing
Unarranged - they use graphical marks for listing
Definition lists They serve for easier defining and representing certain
terms in web documents
HTML recommends using CSS when defining lists.
Elements of arranged lists are represented between <ol></ol> tag and each element
is inside of <li></li> tags. Web browser reader displays Arabian numbers in front
of each element. Attribute type set in the beginning allows using letters or roman
numbers:
<ol type=1> - displays elements using Arabian numbers (default)
<ol type=a> - displays elements using small letters
<ol type=A> - displays elements using big letters
<ol type=i> - displays elements using roman numbers with small letters
Unarranged lists use symbols to mark every element of list, giving possibility of
grouping text element whose order is not important. Elements of unarranged lists
are set between <ul></ul> tag and each element is inside <li></li> tags. Reader
will by default put black point () in front of every element.

By clicking on this picture you can check out this example and you can visit
w3schools to find out more about lists.
HTML links
For connecting web documents we use URL. By URL we can reference text,
HTML document, image, audio or video file,.. Tag <a> </a> is used for creating
hyper text links in web pages. Attributes of <a> tag are:
Href
Name
Title
Rel
Rev
Target
Charset
Most used are href (required), name (optional), title (optional) and target
(optional). Here are some examples of <a> tag:
<a href=English.pdf>Book</a> - this refers to pdf file
<a href=mailto:xxx@mail.xxx> E-mail </a> - this is format of email

Links work even better when you decorate them with CSS. You can check it out
on this link.
HTML tables
HTML tables gives us two important possibilities: displaying text and numbers in a
table and precise objects placement on Web page. Tables are being read from left to
right side. They give us fine look on information put in cells. Designing Web pages
can start by drawing rows and columns (table) by width and height and than
putting content in those rows and cells. Basic tag used for making tables tells
browser which HTML file to put in table and which files from that part to group.
<table> </table> - defines whole table. This element tells browser that text placed
between these two marks is a table.
<tr> </tr> (table row) this element tells browser that information between these
two marks should be in special place of table.
<td> </td> - this represent content of cells. This element tells browser that
attributes and text between this two marks are content which browser need to
display in a cell of table.
Here is an simple example how table look in basic:
HTML forms
Forms allows making dialogs with users of applications. All forms have several
common elements which are: text field for entering data, field for confirmation,
radio buttons, drop down menu, Submit button for sending data to server and
maybe Reset button.
Form is defined by tag <form> </form>. This element usually has next attributes:
Action URL or Web address script on server who will process sent data
Method defines way on which form will be send to server (GET or POST)
Enctype tells browser which coding method to use for forwarding data
script to server
Id is used for giving unique name to a form
POST Web browser is sending data in a message, it is used for changing data in
database.
GET Web browser will send data to Web server as a message added to URL who
need to process data on server.
Elements of HTML form are: text box, textarea, radio button, check box, drop
down list, submit button and reset button. Elements are being created by <input/>
tag which can have next attributes: <input type=button | checkbox | file | hidden |
image | password | radio | reset | submit | text/>. Element <input/> for each field
uses attributes: type, id, name, value and checked. You can check more about
forms on the following link. Here is an simple example of form:

Potrebbero piacerti anche