pborawski

Zajecia z programowania w internecie nr 3 / CSS

Mar 19th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.86 KB | None | 0 0
  1.  
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  4.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6.  
  7. <head>
  8.     <title>bez nazwy</title>
  9.     <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  10.     <meta name="generator" content="Geany 0.21" />
  11.     <!-- w taki sposob deklarujemy style css w naglowku w headzie -->
  12.     <!-- <style type="text/css" >
  13.          h1     {
  14.                 font-family = Arial, sans-serif;
  15.                 font-size = 25px;
  16.                 color : red;
  17.                 text-align = center; }
  18.                 </style>
  19.      
  20.      albo za pomoca pliku dolaczanego -->
  21.     <link rel="stylesheet" type="text/css" href="style.css" >
  22.    
  23.    
  24.     <!-- mozna tez za pomoca odnosnika do selektora o podanym id tj. td id="adres"
  25.          i odradu do danej czesci tego odnosnika np. h1
  26.             #adres h1 {
  27.                     font-family:Arial,sans-serif;
  28.                     font-size:14px;
  29.                     color:red;
  30.                     }
  31.             p.lol { color:green }
  32.          mozna tez odwolac sie do stworzonej klasy dla klasy p
  33.      -->
  34.    
  35.    
  36.     <!--
  37.     Tyle h1 o id adres sie zmienia
  38.     #adres h1{
  39.         font-family : Arial, sans-serif;
  40.         font-size : 14px;
  41.         color : red;}            
  42.     -->
  43.    
  44.     </style>
  45.  
  46. </head>
  47.  
  48. <body>
  49.           <!--
  50.          
  51.           tutaj deklarujemy bezposrednio do danego elementu np h1
  52.           <h1 style="font-family: Arial; color=red;"></h1>             
  53.          
  54.           selektor { wlasnosc : wartosc ; wlasnosc2 : wartosc }
  55.           mozna w grupach
  56.          
  57.           h1,h2,h3 { color : red }
  58.          
  59.           Klasy
  60.           <p class="wazny tekst"></p>
  61.           Definiuje klase p do ktorej mozemy dodawac style np.
  62.           p.waznytekst{color:red}
  63.          
  64.          
  65.           -->
  66.          
  67.           <table>
  68.             <tr>
  69.                 <td id="adres">
  70.                     <h1>Pawel Borawski</h1>
  71.                     <p class="lol"> Trynosy-Osiedle</p>
  72.                     <p> 07-311 Wasewo</p>
  73.                 </td>
  74.             </tr>
  75.             <tr>
  76.                 <td id="tekst">
  77.                     <h1> Jakies tekst</h1>
  78.                 </td>
  79.             </tr>
  80.           </table>
  81.          
  82. </body>
  83.  
  84. </html>
Advertisement
Add Comment
Please, Sign In to add comment