Advertisement
am_dot_com

SW20210326

Mar 26th, 2021 (edited)
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 6.52 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>img, figure, figcaption, map, area</title>
  6. </head>
  7. <body>
  8.     <figure>
  9.         <!-- legenda / texto descritivo da figure -->
  10.         <figcaption>3 very important women : Angela Merkel, Gina Haspel, Theresa May</figcaption>
  11.         <img
  12.                usemap="#nameMapAngelaGinaTheresa"
  13.                alt="left to right: Angela Merkel, Gina Haspel, Theresa May"
  14.                width="50%"
  15.                src="./angela_merkel_gina_haspel_theresa_may.jpg"
  16.        >
  17.     </figure>
  18.  
  19.     <!--
  20.        elemento organizado em áreas que permite fazer corresponder a tais áreas, informações
  21.        um conjunto de áreas
  22.    -->
  23.  
  24.     <!--
  25.    coordenada (horizontal crescem da esq para a dta, vertical crescem de cima para baixo)
  26.    coordenada (0,0) é o canto superior esquerdo da imagem
  27.  
  28.    - para shapes "rect" há que fornecer as coordenadas do CSE e do CID
  29.    - para shapes "circ" há que fornecer as coordenadas do centro e do raio
  30.  
  31.    O mapeamento pode falhar, ou aparecer em coordenada estranhas, se o utilizador
  32.    forçar operações de escala / zoom in / zoom out sobre a imagem
  33.    essa ops podem ser feitas, tipicamente, via keyboard via CTRL+ CTRL-
  34.    e/ou pelo dispositivo apontador, via mouse-wheel+UP mouse-wheel+down
  35.    NÃO FAZER
  36.    para fazer reset ao zoom , fazer CTRL+0 (zero)
  37.    -->
  38.  
  39.     <hr><!-- quebra semântica -->
  40.  
  41.     <section>
  42.         <header>
  43.             <h1>Biografias referidas neste documento</h1>
  44.         </header>
  45.         <nav>
  46.             <ul>
  47.                 <li><a href="https://en.wikipedia.org/wiki/Angela_Merkel"><mark>Angela Merkel</mark></a></li>
  48.                 <li><a href="https://en.wikipedia.org/wiki/Gina_Haspel">Gina Haspel</a></li>
  49.                 <li><a href="https://en.wikipedia.org/wiki/Theresa_May">Theresa May</a></li>
  50.             </ul>
  51.         </nav>
  52.     </section>
  53.  
  54.     <map
  55.        name="nameMapAngelaGinaTheresa"
  56.    >
  57.         <area
  58.            alt="Angela Merkel, german politician who would serve as the chancellor of Germany"
  59.            title="Angela Merkel"
  60.            shape="rect"
  61.            coords="110, 50, 250, 250"
  62.            href="https://en.wikipedia.org/wiki/Angela_Merkel"
  63.        >
  64.         <area
  65.            alt="Gina Haspel, future Director of CIA"
  66.            title="Gina Haspel"
  67.            shape="circle"
  68.            coords="370, 160, 120"
  69.            href="https://en.wikipedia.org/wiki/Gina_Haspel"
  70.        >
  71.         <area
  72.            alt="Theresa May, future UK prime-minister"
  73.            title="Theresa May"
  74.            shape="poly"
  75.            coords="515, 30, 670, 30, 670, 220, 515, 220"
  76.            href="https://en.wikipedia.org/wiki/Theresa_May"
  77.        >
  78.     </map>
  79.  
  80.     <hr>
  81.  
  82.     <section><!-- um doc pode ter várias section e vários article -->
  83.         <article><!-- article pode ter várias sections, também -->
  84.             <header>
  85.                 <h1>Angela Merkel</h1>
  86.                 <h2>Chancellor of Germany</h2>
  87.                 <h3>Still in this day, 2021-03-26</h3>
  88.             </header>
  89.  
  90.             <section>
  91.                 <article>
  92.                     <!-- infância -->
  93.                     <p>Bla bla bla.</p>
  94.                 </article>
  95.             </section>
  96.  
  97.             <section>
  98.                 <!-- primeiros anos políticos -->
  99.             </section>
  100.         </article>
  101.  
  102.         <hr>
  103.         <article></article>
  104.  
  105.         <hr>
  106.         <article></article>
  107.     </section>
  108.  
  109. </body>
  110. </html>
  111.  
  112. *********
  113.  
  114. <!DOCTYPE html>
  115. <html lang="en">
  116. <head>
  117.     <meta charset="UTF-8">
  118.     <title>Introdução ao JS</title>
  119. </head>
  120. <body>
  121. <!-- -->
  122.     <script>
  123.         //single line
  124.  
  125.         /*
  126.         JS = linguagem "fracamente tipificada" => as entidades têm SEMPRE um tipo, mas esse tipo pode mudar
  127.         Java = linguagem "fortemente tipificada" => as entidades têm SEMPRE um tipo, que nunca pode mudar
  128.  
  129.         3 formas de entidade diferentes = const , var , function
  130.  
  131.         procedimental
  132.         orientada a objetos = por prototipagem
  133.          */
  134.  
  135.         const PI = 3.1415; //fim de instrução (operação de atribuição) simples
  136.         var i= undefined; //declaração de um identificador de nome i
  137.         ;
  138.         ; //notação do camelo / camel-notation para identificadores
  139.         //hungarian postfix notation
  140.         ;
  141.         ; //instrução vazia "NOP" = No Operation
  142.         var tipoDoPI = typeof (PI);
  143.         var tipoDoI = typeof (i);
  144.         var tipo_do_i = typeof(i); //operando-esquerdo ; operador (binário = 2 operandos = aridade 2) ; operando-direito
  145.         var soma = 2+3; //a sintaxe / a notação + faz de operador aritmético de soma
  146.         //var soma = /* n-ária */ +(1 2 3 4 5 6); //em LISP
  147.  
  148.         var fraseParaPI = "O tipo do identificador PI é "+tipoDoPI+"<br>";
  149.         var fraseParaI="O tipo do identificador i é "+tipoDoI+"<br>"; // + operador concatenação
  150.         document.write (fraseParaPI);
  151.         document.write (fraseParaI);
  152.  
  153.         //undefined = {undefined}
  154.         // boolean = {true, false}
  155.         // number = {23.0, 1.2}
  156.         // int 16 bits 2^16 = 65536 = {2, 65537} = {-32768, 32767} LISP
  157.         document.write ("<h1>Tipos de dados nativos em JS</h1>");
  158.         var souUmUndefined;
  159.         var tipoDeSouUmUndefined = typeof(souUmUndefined);
  160.  
  161.         var souUmNumberInteiro = 3;
  162.         var tipoDeSouUmNumberInteiro = typeof(souUmNumberInteiro);
  163.  
  164.         var souUmNumberReal = 3.3;
  165.         var tipoDeSouUmNumberReal = typeof(souUmNumberReal);
  166.  
  167.         var souUmaString = "Artur";
  168.         var tipoDeSouUmaString = typeof(souUmaString);
  169.  
  170.         var souUmBoolean = true;
  171.         var tipoDeSouUmBoolean = typeof(souUmBoolean);
  172.  
  173.         //JavaScript Object Notation = JSON
  174.         var souUmObjecto = {"idade":999};
  175.         var tipoDeSouUmObjecto = typeof(souUmObjecto);
  176.  
  177.         var souUmaFunction = function soma1 (valor){return valor+1;};
  178.         var tipoDeSouUmaFunction = typeof(souUmaFunction);
  179.  
  180.         document.write(tipoDeSouUmUndefined); document.write("<br>");
  181.         document.write(tipoDeSouUmNumberInteiro);  document.write("<br>");
  182.         document.write(tipoDeSouUmNumberReal); document.write("<br>");
  183.         document.write(tipoDeSouUmaString); document.write("<br>");
  184.         document.write(tipoDeSouUmBoolean); document.write("<br>");
  185.         document.write(tipoDeSouUmObjecto); document.write("<br>");
  186.         document.write(tipoDeSouUmaFunction); document.write("<br>");
  187.  
  188.  
  189.  
  190.  
  191.  
  192.     </script>
  193. </body>
  194. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement