You are on page 1of 29

HTML

WWW
World

wide web je najpopularnija usluga Interneta Mrea informacijskih resurasa Aleksandrijska knjinica Informacije svima dostupne i besplatne

WWW
itanje

informacija

Web preglednik Trailice

Objavljivanje

Informacija

Web building izrada vlastitih web stranica WYSIWYG FrontPage Dreamweaver HTML

HTML

Hyper Text Markup Language Markup tagovi oznake uz tekst koje govore kako se prikazuje tekst

<b>fesb</b>
Sadraj taga Start tag

End tag

HTML
<!doctype> <html>
<head>

</head> <body> </body>

</html>
5

Html atributi

<body bgcolor=navy> U start tagu Atribut=vrijednost Boje <body bgcolor=#000080>

http://www.w3schools.com/html/html_colornames.asp
6

Osnovni tagovi
Tag Description

<html>
<body> <h1> to <h6> <p>

<br> <hr> <!-->

Defines an HTML document Defines the document's body Defines header 1 to header 6 Defines a paragraph Inserts a single line break Defines a horizontal rule Defines a comment
7

HTML Text Formatting


Tag <b> <big> <em> <i> <small> <sub> <sup> <ins> <del> <s> <strike> <u> Description Defines bold text Defines big text Defines emphasized text Defines italic text Defines small text Defines subscripted text Defines superscripted text Defines inserted text Defines deleted text Deprecated. Use <del> instead Deprecated. Use <del> instead Deprecated. Use styles instead
8

<strong> Defines strong text

primjeri

"Computer Output" Tags


Tag <code> <kbd> <samp> <tt> <var> <pre> <listing> <plaintext> <xmp> Description Defines computer code text Defines keyboard text Defines sample computer code Defines teletype text Defines a variable Defines preformatted text Deprecated. Use <pre> instead Deprecated. Use <pre> instead Deprecated. Use <pre> instead

primjeri
9

Citations, Quotations, and Definition Tags


Tag <abbr> Description Defines an abbreviation

<acronym>
<address> <bdo> <blockquote>

Defines an acronym
Defines an address element Defines the text direction Defines a long quotation

<q>
<cite> <dfn>

Defines a short quotation


Defines a citation Defines a definition term

primjeri

10

Entiteti
Neki

znakovi (poput <) imaju posebno znaenje u HTML-u Da bi se prikazali na web stranici koistimo entitete Entitet se sastoji od:
& Ime ili # i broj ;

Najpopularniji

&nbsp;
11

Najee koriteni entiteti


Res Description ult non-breaking space < > & " ' less than greater than ampersand Entity Name &nbsp; &lt; &gt; &amp; Entity Number &#160; &#60; &#62; &#38; &#34; &#39;
12

quotation mark &quot; apostrophe &apos; (does not work in IE)

Jo neki entiteti
Result Description cent

Entity Name
&cent;

Entity Number
&#162;

pound
yen section copyright registered trademark multiplication division
Svi entiteti

&pound;
&yen; &sect; &copy; &reg; &times; &divide;

&#163;
&#165; &#167; &#169; &#174; &#215; &#247;
13

Anchor Tag i Href atribut

HTML koristi <a> (anchor) tag za kreiranje linka na drugi dokument Anchor moe povezivati na bilo koji resurs na webu : HTML stranicu, sliku, zvuk, film itd Sitaksa za kreiranje linka je:

<a href="url">Text to be displayed</a>


<a> tag koristi se za kreiranje mjesta koje povezuje. href atribut se koristi za adresiranje dokumenta na kojeg povezuje Tekst izmeu otvarajueg i zatvarajueg taga je tekst koji e se prikazivati na dokumentu i predstavljati poveznicu (hyperlink) Npr:
<a href="http://www.w3schools.com/">Visit W3Schools!</a>
14

Target atribut
Target atribut odrauje gdje e se povezani dokument otvoriti. <a href="http://www.w3schools.com/" target="_blank">Visit W3Schools!</a>

_blank _parent _self

the target URL will open in a new window the target URL will open in the parent frameset the target URL will open in the same frame as it was clicked

_top

the target URL will open in the full body of the window
15

Anchor Tag i Name atribut


Name atribut koristi se da bi se kreiralo imenovano sidro Koritenjem sidra moemo kreirati linkove koji e nas voditi do tono odreenog mjesta na stranici <a name="tips">Useful Tips Section</a> Ne ispisuju se na poseban nain kao linkovi da bismo kreirali link na sekciju tips dodajemo # i ime sekcije na kraj URLa

<a href="http://www.w3schools.com/html_links.asp#tips"> Jump to the Useful Tips Section</a> Ako se sidro nalazi unutar iste stranice kao i link href atribut izgleda: <a href="#tips">Jump to the Useful Tips Section</a>
primjeri
16

Umetanje slika
<img

src="url">

URL

Apsolutni Relativni

Nema

zatvarajueg taga! U skladu s xhtml <img src=url />

17

Required Attributes
indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
DTD

Attribute

Value

Description

DTD

alt src

text URL

Defines a STF short description of the image The URL of the image to display STF

18

Optional Attributes

Attribute

Value top bottom middle left right pixels pixels % pixels

Description
Specifies how to align the image according to surrounding text. Deprecated. Use styles instead

DTD TF

align

border height hspace

Defines a border around an image. Deprecated. Use styles instead Defines the height of an image

TF STF TF

Defines white space on the left and right side of the image. Deprecated. Use styles instead Defines the image as a server-side image map A URL to a document that contains a long description of the image Defines the image as a client-side image map. Look at the <map> and <area> tags to figure out how it works Defines white space on the top and bottom of the image. Deprecated. Use styles instead Sets the width of an image

ismap longdesc
usemap vspace width

URL
URL URL pixels pixels %

STF
STF STF TF STF
19

Standard Attributes
id, class, title, style, lang, xml:lang

Event Attrbutes
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

primjeri

20

Image Tags

Tag <img> <map> <area>

Description Defines an image Defines an image map Defines an area inside an image map

Radi brzine uitavanja preporuka je izbjegavati slike na web stranici i dodavati samo neophodne slike Odabrati komprimirane formate slike radi breg uitavanja

21

The <map> tag


Source <p>Click on one of the planets:</p> <img src ="planets.gif" width ="145" height ="126" alt="Planets" usemap ="#planetmap" /> <map id ="planetmap" name="planetmap"> <area shape ="rect" coords ="0,0,82,126" href ="sun.htm" target ="_blank" alt="Sun" /> <area shape ="circle" coords ="90,58,3" href ="mercur.htm" target ="_blank" alt="Mercury" /> <area shape ="circle" coords ="124,58,8" href ="venus.htm" target ="_blank" alt="Venus" /> </map>
22

Output Click on one of the

planets:

Liste
Preporuka

: ne koristiti <br> umjesto lista Svaka stavka se uokviruje <li> tagom Nepobrojane - <ul>

Type: disc | square | circle

Pobrojane

-<ol>

Start : redni broj prve stavke Vrste A | a | I | I | 1

Liste

definicija -<dl>
23

List Tags

Tag

Description

<ol>
<ul> <li> <dl> <dt> <dd> <dir> <menu>

Defines an ordered list


Defines an unordered list Defines a list item Defines a definition list Defines a definition term Defines a definition description Deprecated. Use <ul> instead Deprecated. Use <ul> instead

primjeri
24

Okviri ( frejmovi)
Pomou okvira mogue je prikazati vie od jednog html dokumenta u jednom prozoru preglednika. Svaki dokument predstavlja jedan okvir frame Svaki okvir neovisan je o ostalima. Nedostaci koritenja okvira su:

Programer mora voditi rauna o vie dokumenata Teko je ispisati itavi stranicu.

25

Frameset Tag

<frameset> tag definira kako podijeliti prozor preglednika u okvire Svaki frameset definira skup redaka(rows) ili kolona (columns) Vrijednosti rows/columns oznaavaju koliki dio povrine ekrana zauzima svaki okvir

Postotak ekrana Broj pixela * - oznaka ostatka ekrana


26

Frame Tag
<frame> tag odreuje koji html dokument prikazati u okviru <frameset cols="25%,75%"> <frame src="frame_a.htm"> <frame src="frame_b.htm"> </frameset> Ukoliko su granice okvira vidljive korisnik e moi mijenjati veliinu okvira. Da bismo to sprijeili moemo dodati noresize="noresize" atribut <frame> tagu Preporuka : Dodajite <noframes> tag za browsere koji ne prikazuju okvire

primjeri
27

Frame tagovi
Tag Description

<frameset>
<frame> <noframes> <iframe>

Defines a set of frames


Defines a sub window (a frame) Defines a noframe section for browsers that do not handle frames Defines an inline sub window (frame)

Navigacijski frameovi Frameovi i sidra

primjeri
28

Tablice

Forme

29

You might also like