Sunteți pe pagina 1din 32

Ctlin Tudose Scurt prezentare html elemente de baz

LIMBAJUL HTML

Ctlin Tudose Scurt prezentare html elemente de baz

1. COMPONENTELE ELEMENTARE ALE UNUI DOCUMENT HTML

<html> <head> <title> PAS 01 - Pagina elementara </title> </head> <body> Hello world ! </body> </html>

Ctlin Tudose Scurt prezentare html elemente de baz

2. GENERAREA UNUI SALT LA LINIE NOU N HTML

<html> <head> <title> PAS 02 - Trecerea la linie noua </title> </head> <body> In HTML putem crea o noua linie folosind BR sau P (nu ENTER)<br> Linie terminata cu BR (break)<br> Linie terminata cu BR<br> Linie terminata cu BR<br> Linie terminata cu P (Paragraph)<p> Linie terminata cu P<p> Linie terminata cu P<p> </body> </html>

Ctlin Tudose Scurt prezentare html elemente de baz

3. FOLOSIREA MRIMILOR STANDARD DE CARACTERE

<html> <head> <title> PAS 03 - Marimi standard ale caracterelor </title> </head> <body> Aceste marimi depind de setarile din meniul View -> Text size... <h1> Titlu marimea H1 </h1> <h2> Titlu marimea H2 </h2> <h3> Titlu marimea H3 </h3> <h4> Titlu marimea H4 </h4> <h5> Titlu marimea H5 </h5> <h6> Titlu marimea H6 </h6> </body> </html>

Ctlin Tudose Scurt prezentare html elemente de baz

4. DIMENSIUNEA IMPLICIT A FONTULUI N BROWSER

<html> <head> <title> curs 04 - Folosirea marimii implicite a fontului </title> </head> <body> Marimea fontului depinde de setarile Browser-ului </body> </html>

Ctlin Tudose Scurt prezentare html elemente de baz

5. SELECTAREA TIPULUI DE FONT

<html> <head> <title> PAS 05 - Alegerea fontului </title> </head> <body> <font face = "times new roman"> Aici folosim Times new roman </font><br> <font face = "arial"> Aici folosim Arial </font><br> <font face = "tahoma"> Aici folosim Tahoma</font> </body> </html>

Ctlin Tudose Scurt prezentare html elemente de baz

6. SELECTAREA MRIMII FONTULUI

<html> <head> <title> PAS 06 - Alegerea marimii fontului </title> </head> <body> <font face = "times new roman" size = "4"> font marimea 4 </font><br> <font face = "times new roman" size = "3"> font marimea 3 </font><br> <font face = "times new roman" size = "2"> font marimea 2 </font><br> <font face = "times new roman" size = "1"> font marimea 1 </font><br> </body> </html>

Ctlin Tudose Scurt prezentare html elemente de baz

7. SELECTAREA CULORII FONTULUI

<html> <head> <title> PAS 07 - Alegerea culorii fontului </title> </head> <body> <font face = "times new roman" size = "4" color = "blue"> font marimea 4 </font><br> <font face = "times new roman" size = "3" color = "red"> font marimea 3 </font><br> <font face = "times new roman" size = "2" color = "lime"> font marimea 2 </font><br> <font face = "times new roman" size = "1" color = "light blue"> font marimea 1 </font><br> </body> </html>

Ctlin Tudose Scurt prezentare html elemente de baz

8. ETICHETE AJUTTOARE (TOOLTIPS)

<html> <head> <title> PAS 08 - Etichete ajutatoare (tooltips) </title> </head> <body> <font face = "times new roman" size = "3" color = "blue" title = "Font albastru"> Aduceti mouse-ul deasupa acestui text ! </font> </body> </html>

Ctlin Tudose Scurt prezentare html elemente de baz

9. STILURI

DE AFIARE A FONTULUI

<html> <head> <title> PAS 09 - Formatari Bold, Italic, Underlined </title> </head> <body> <font face = "times new roman" size = "3"> Scris <b>Bold (ingrosat)</b>,<i> Italic (inclinat)</i>,<u> Underlined (subliniat),</u><br> <b><i> Bold si Italic </i></b>,<i><u> Italic si Underlined,<b> Bold, Italic si Underlined </b></u></i>. </font> </body> </html>

10

Ctlin Tudose Scurt prezentare html elemente de baz

10. FORMATRI STRIKE

<html> <head> <title> PAS 10 - Formatari strike </title> </head> <body> <font face = "times new roman" size = "4" color ="red"> <b> Text <strike> taiat cu o linie orizontala </strike> </font> </body> </html>

11

Ctlin Tudose Scurt prezentare html elemente de baz

11. FORMATRI SMALL I BIG

<html> <head> <title> PAS 11 - Formatari Small si Big </title> </head> <body> <font face = "times new roman" size = "4" color ="blue"> <big> Text mai mare </big> Text normal <small> Text mai mic </small> </font> </body> </html>

12

Ctlin Tudose Scurt prezentare html elemente de baz

12. FORMATRI INDICE I EXPONENT

<html> <head> <title> PAS 12 - Formatari Indice si Exponent </title> </head> <body> <font face = "times new roman" size = "2" color ="black"> Pitagora: <b>c<sup>2</sup>=a<sup>2</sup>+b<sup>2</sup>;</b><br> John Doe: <b>X<sub>i</sub>=a<sub>j</sub>+b<sub>k</k>;</b> </font> </body> </html>

13

Ctlin Tudose Scurt prezentare html elemente de baz

13. INSERAREA FORMULELOR

<html> <head> <title> PAS 13 - Formatari tip formula </title> </head> <body> <font face = "times new roman" size = "2"> Ecuatia de gradul doi: <code>ax<sup>2</sup>+bx+c=0</code> </font> </body> </html>

14

Ctlin Tudose Scurt prezentare html elemente de baz

14. TABELE SIMPLE

<html> <head> <title> PAS 14 - Tabele simple </title> </head> <body> <font face="times new roman"><b><center>Tabele simple</center></b></font><br> <table border = "1"> <tr><td>NR.</td><td>NUME</td><td>Prenume</td><td>Varsta </td></tr> <tr><td>1.</td><td>Vasilescu</td><td>Ionut</td><td>25</td></tr> <tr><td>2.</td><td>Ionescu</td><td>Marius</td><td>18</td></tr> <tr><td>3.</td><td>Popescu</td><td>Ioana</td><td>28</td></tr> </table> </body> </html>

15

Ctlin Tudose Scurt prezentare html elemente de baz

15. TABELE 3D

<html> <head> <title> PAS 15 - Tabele 3D </title> </head> <body> <font face="times new roman"><b> Tabele 3D (border > 3)</b></font><br><br><br> <table border = "3"> <tr><td>NR.</td><td>NUME</td><td>Prenume</td><td> Varsta</td></tr> <tr><td>1.</td><td>Vasilescu</td><td>Ionut</td><td>25</td></tr> <tr><td>2.</td><td>Ionescu</td><td>Marius</td><td>18</td></tr> <tr><td>3.</td><td>Popescu</td><td>Ioana</td><td>28</td></tr> </table> </body> </html>

16

Ctlin Tudose Scurt prezentare html elemente de baz

16. FORMATAREA CELULELOR

<html> <head> <title> PAS 16 - Formatari ale celulelor in tabel </title> </head> <body> <font face="times new roman"><b>Formatari in tabel (cellspacing, cellpadding)</b></font><br> <table border = "3" color = "red" cellpadding = "10" cellspacing = "5"> <tr><td>NR.</td><td>N</td><td>Prenume</td><td>Varsta</td></tr> <tr><td>1.</td><td>Vasilescu</td><td>Ionut</td><td>25</td></tr> <tr><td>2.</td><td>Ionescu</td><td>Marius</td><td>18</td></tr> <tr><td>3.</td><td>Popescu</td><td>Ioana</td><td>28</td></tr> </table> </body> </html>

17

Ctlin Tudose Scurt prezentare html elemente de baz

17. ALINIEREA IN CELULE

<html> <head> <title> PAS 17 - Alinierea in celule </title> </head> <body> <font face="times new roman"><b>Alinierea in celule</b></font><br> <table border = "3"> <tr><td>NR.</td><td>ABCDEFGH</td><td> ABCDEFGH</td><td>ABCDEFGH</td></tr> <tr><td align = "center">1.</td><td align = "right">Vasilescu</td><td>Ionut</td><td>25</td></tr> <tr><td align = "center">2.</td><td align = "right">Ionescu</td><td>Marius</td><td>18</td></tr> <tr><td align = "center">3.</td><td align = "right">Popescu</td><td>Ioana</td><td>28</td></tr> </table> </body> </html>

18

Ctlin Tudose Scurt prezentare html elemente de baz

18. UNIREA CELULELOR

<html> <head> <title> PAS 18 - Unirea celulelor </title> </head> <body> <font face="times new roman"><b><center> Unirea celulelor (colspan)</center></b></font><br> <table border = "1"> <tr><td>NR.</td><td>NUME</td><td>Prenume</td><td>Varsta</td></tr> <tr><td>1.</td><td>Vasilescu</td><td>Ionut</td><td>25</td></tr> <tr><td>2.</td><td>Ionescu</td><td>Marius</td><td>18</td></tr> <tr><td>3.</td><td colspan = 2>John Doe</td><td>?!</td></tr> </table> </body> </html>

19

Ctlin Tudose Scurt prezentare html elemente de baz

19. LISTE ORDONATE I NEORDONATE

<html> <head> <title> PAS 19 - Liste ordonate si neordonate </title> </head> <body> <font face = "times new roman" size = "4">Liste<br> <font face = "times new roman" size = "2">Neordonate<br> <ul> <li> Prima <li> A doua <li> A treia </ul> <br> <font face = "times new roman" size = "2">Ordonate<br> <br> <ol> <li> Prima <li> A doua <li> A treia </ol> </body> </html>

20

Ctlin Tudose Scurt prezentare html elemente de baz

20. LISTE IMBRICATE

<html> <head> <title> PAS 20 - Liste imbricate </title> </head> <body> <font face = "times new roman" size = "4">Liste imbricate<br> <font face = "times new roman" size = "2"><br> <ul><li> A<li> B <ul><li> B1<li> B2 <li> B3 </ul> <li> C <li> D </ul> </body> </html>

21

Ctlin Tudose Scurt prezentare html elemente de baz

21. FOLOSIREA LEGTURILOR (HYPERLINKS) <html> <head> <title> PAS 21 - Legaturi </title> </head> <body> <a href = "#tinta 3"> Mergem la tinta 1 </a><br> <a href = "#tinta 2"> Mergem la tinta 2 </a><br> <a href = "#tinta 3"> Mergem la tinta 3 </a><br> SFE Corporation Limited este o companie public ale crei aciuni sunt listate la Austock. Se are n vedere listarea la Asx n 2002. SFE i filialele sale asigur realizarea tranzaciilor bursiere i ofer servicii financiare OTC n principal instituiilor din regiunea Asia - Pacific. Complet electronic i cu posibilitate de tranzacionare 24 de ore SFE ofer pieei financiare produse pentru investiii i management de risc, disemineaz timpul real de timpul istoric n privina datelor de pia i ofer clearing centralizat, settlement i depozite pentru produse derivate i produse cash. <br><a name = "tinta 1"> Tinta 1 </a><br> </body> </html>

22

Ctlin Tudose Scurt prezentare html elemente de baz

22. INSERAREA IMAGINILOR

<html> <head> <title> curs 22 - Imagini </title> </head> <body> <h5> Imagini ! </h5> <img src = "imagini\fish.jpg"> <img src = "imagini\earth.jpg" align = "center"><br> <img src = "imagini\cake.jpg" align = "right" border = "3"><br> </body> </html>

23

Ctlin Tudose Scurt prezentare html elemente de baz

SINTAXA LIMBAJULUI HTML

Sintaxa elementelor pentru texte: < FONT >


<FONT... COLOR="Font colour" FACE="Font Face" LANG="Language" SIZE="Font size" STYLE="In line styling" TITLE="Informational ToolTip"

Exemple: <FONT SIZE=4>Schimba marimea fontului la 4</FONT> <FONT SIZE=+2>schimba marimea fontului la marimea de baza + 2</FONT>
<FONT COLOR="Red">Acest text este rosu.</FONT> <FONT FACE="Courier New, Comic Sans MS"> Acest font va fi afisat fie Courier New, fie Comic Sans MS, in functie de ce fonturi sunt instalate pe calculatorul client. </FONT>

<B>
<B... LANG="Language" TITLE="Informational ToolTip">

Exemplu: Textul urmator va fi afisat <b> ingrosat</b>.

<I >
<I... LANG="Language" LANGUAGE="Scripting language" TITLE="Informational ToolTip">

24

Ctlin Tudose Scurt prezentare html elemente de baz Exemplu: Acesta este un <i>text italic</i>

<U>
<U... LANG="Language" TITLE="Informational ToolTip">

Exemplu: <U>Text subliniat</U>

25

Ctlin Tudose Scurt prezentare html elemente de baz

< STRIKE >


<STRIKE... LANG="Language" TITLE="Informational ToolTip"> STYLE="In line styling" Exemplu: <strike> Text taiat</strike>

< SUB >


<SUB... LANG="Language" LANGUAGE="Scripting language" TITLE="Informational ToolTip">

Exemplu: Textul urmator va fi afisat ca un <sub>indice</sub>.

< SUP >


<SUP... LANG="Language" TITLE="Informational ToolTip">

Exemplu: <sup> Textul acesta </sup> va fi afisat ca exponent.

26

Ctlin Tudose Scurt prezentare html elemente de baz

<CODE ...>
<CODE... LANG="Language" TITLE="Informational ToolTip">

Exemplu: Formula este : <CODE>x=(-b+/-(b2-4ac))/2a</CODE>.

27

Ctlin Tudose Scurt prezentare html elemente de baz

Elemente de formatare n blocuri de texte:

< BLOCKQUOTE >

<BLOCKQUOTE... LANG="Language" TITLE="Informational ToolTip">

Este folosit pentru a afia citate din alte surse. Textul citat va fi indentat la stnga i la dreapta fata de cel normal.

< CENTER >

<CENTER... LANG="Language" TITLE="Informational ToolTip">

Centreaz textul n cadrul paginii HTML.

<P>

<P... ALIGN="Heading alignment" LANG="Language" TITLE="Informational ToolTip">

28

Ctlin Tudose Scurt prezentare html elemente de baz Este folosit pentru introducerea paragrafelor. Exemplu: <P align=left> Acesta este un paragraph aliniat la stanga</P>

<MARQUEE >

<MARQUEE ALIGN="left|right|top|middle|bottom" BEHAVIOR="scroll|slide|alternate" BGCOLOR="#rrggbb|colour name" DIRECTION="left|right" HEIGHT="value|value%" LOOP="value|-1|infinite" TITLE="Informational ToolTip" WIDTH="value|value%">

29

Ctlin Tudose Scurt prezentare html elemente de baz


Exemplu:

<MARQUEE BGCOLOR="#F0F8FF" BEHAVIOR=ALTERNATE>Acest text se va derula pe ecran!<MARQUEE> <MARQUEE SCROLLDELAY=1 rapid</MARQUEE> SCROLLAMOUNT=75>Sunt foarte

Sintaxa elementelor pentru liste

Liste pentru definiii:

< DL >
<DL... LANG="Language" LANGUAGE="Scripting language" STYLE="In line styling" TITLE="Informational ToolTip">

Trebuie s fie imediat urmat de elementele <DT> i <DD>. Exemplu: <DL> <DT>CPU <DD>Unitate centrala de prelucrare <DT>HDD <DD>Hard disk drive </DL>

Liste ordonate: 30

Ctlin Tudose Scurt prezentare html elemente de baz

< OL >
<OL... LANG="Language" LANGUAGE="Scripting language" TITLE="Informational ToolTip" TYPE="Numbering type" START="Start value"> Trebuie s fie imediat urmat de elementul <LI> care va defini fiecare element al listei. Exemplu: <OL> <LI>Click on the desired file to download. <LI>In the presented dialog box, enter a name to save the file with. <LI>Click 'OK' to download the file to your local drive. </OL> Atributul TYPE poate lua urmtoarele valori: (TYPE=A) litere mari. Ex: A, B, C ... (TYPE=a) litere mici. Ex: a, b, c ... (TYPE=I) Cifre romane. Ex: I, II, III ... (TYPE=i) Cifre romane mici. Ex: i, ii, iii ... (TYPE=1) Cifre arabe. Ex: 1, 2, 3 ...

31

Ctlin Tudose Scurt prezentare html elemente de baz Atributul START specific poziia de la care se pornete n numerotare: <OL TYPE=a START=3> <LI>Click on the desired file to download. <LI>In the presented dialog box, enter a name to save the file with. <LI>Click 'OK' to download the file to your local drive. </OL>

Liste neordonate

< UL >
<UL... LANG="Language" TITLE="Informational ToolTip" TYPE="Bullet type">

Trebuie urmat de elementul <LI> care va preciza elementul listei. Exemplu: <UL> <LI>First list item <LI>Second list item <LI>Third list item </UL> Atributul TYPE poate lua urmtoarele valori: TYPE=disc TYPE=circle TYPE=square

32

S-ar putea să vă placă și