{"id":188,"date":"2019-01-21T19:59:46","date_gmt":"2019-01-21T17:59:46","guid":{"rendered":"http:\/\/tutorial.bernatcortina.cat\/?page_id=188"},"modified":"2019-01-21T19:59:46","modified_gmt":"2019-01-21T17:59:46","slug":"enllacos","status":"publish","type":"page","link":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/","title":{"rendered":"Enlla\u00e7os"},"content":{"rendered":"<p style=\"text-align: justify;\">La funci\u00f3 b\u00e0sica d&#8217;un vincle \u00e9s la de fer una <b>refer\u00e8ncia<\/b>, d&#8217;un document HTML a un recurs, que pot ser al seu torn un altre document. En altres paraules, un enlla\u00e7 defineix una relaci\u00f3 entre dos recursos a la web.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.w3schools.com\/Tags\/tag_a.asp\">Refer\u00e8ncia element a<\/a><\/p>\n<h1 style=\"text-align: justify;\">L\u2019element a<\/h1>\n<p style=\"text-align: justify;\">L&#8217;element a pot ser utilitzat per <b>inserir vincles<\/b> dins del contingut del document. En general aquests vincles, en conjunt amb les funcionalitats dels navegadors, permeten als usuaris traslladar-se d&#8217;un document a un altre d&#8217;una manera molt directa.<\/p>\n<p style=\"text-align: justify;\">D&#8217;entre les moltes formes que els autors tenen per construir un vincle, la m\u00e9s b\u00e0sica consisteix en l&#8217;element a amb el seu contingut (el text entre les etiquetes d&#8217;obertura i tancament) i una refer\u00e8ncia al recurs apuntat (una adre\u00e7a especificada a l&#8217;atribut href).<\/p>\n<p style=\"text-align: justify;\"><i>Exemple. Un vincle b\u00e0sic. Etiqueta d&#8217;obertura amb l&#8217;adre\u00e7a del recurs en l&#8217;atribut href, el contingut i l&#8217;etiqueta de tancament.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-189\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png\" alt=\"\" width=\"483\" height=\"101\" \/><\/p>\n<p style=\"text-align: justify;\"><i>Exemple. Un vincle amb imatge. Etiqueta d\u2019obertura amb l\u2019adre\u00e7a del recurs en l\u2019atribut href, en el contingut del vincle, afegim l\u2019etiqueta d\u2019imatge.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-190\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-11.png\" alt=\"\" width=\"595\" height=\"164\" \/><\/p>\n<h1 style=\"text-align: justify;\">Enlla\u00e7os a parts de la web<\/h1>\n<p style=\"text-align: justify;\">Un vincle tamb\u00e9 pot ser m\u00e9s espec\u00edfic i enlla\u00e7ar a un fragment particular d&#8217;un altre document. Per crear aquest tipus de vincles, s\u2019han de fer dues coses:<\/p>\n<ol>\n<li>Preparar el document de destinaci\u00f3, afegint un <b>atribut id<\/b> a l&#8217;element al que necessites enlla\u00e7ar.<\/li>\n<li><b>Crear l&#8217;enlla\u00e7<\/b> al document d&#8217;origen (amb l&#8217;element a) agregant a on hi posar\u00edem l\u2019adre\u00e7a del document de destinaci\u00f3, un s\u00edmbol numeral (&#8220;#&#8221;) i <b>l&#8217;identificador<\/b> usat en el pas anterior.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><i>Exemple. Trobem diferents section cadascun definit amb un atribut id.<\/i><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-191\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-12.png\" alt=\"\" width=\"583\" height=\"426\" \/><\/p>\n<ul style=\"text-align: justify;\">\n<li><i>Aqu\u00ed pots veure, b\u00e0sicament, tres coses: l&#8217;element section establint l\u00edmits i contenint a tots els elements de la secci\u00f3; la cap\u00e7alera h1 definint un t\u00edtol per a la secci\u00f3; i el contingut. Els diferents elements section tenen l\u2019atribut id, perqu\u00e8 els vincles puguin fer refer\u00e8ncia a &#8220;aquesta secci\u00f3 del document&#8221;.<\/i><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul style=\"text-align: justify;\">\n<li><i>Segona part. Creaci\u00f3 d&#8217;un vincle a aquesta mateixa p\u00e0gina, agregant el s\u00edmbol numeral (&#8220;#&#8221;) i el valor de l&#8217;atribut id de la secci\u00f3 enlla\u00e7ada en l&#8217;atribut href.<\/i><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-193\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-14.png\" alt=\"\" width=\"424\" height=\"86\" \/><\/p>\n<h1 style=\"text-align: justify;\">Enlla\u00e7os a e-mail<\/h1>\n<p style=\"text-align: justify;\">El format m\u00e9s b\u00e0sic per crear vincles de correu electr\u00f2nic consisteix en la cadena &#8220;mailto:&#8221; seguida per una llista d&#8217;una o m\u00e9s adreces de correu electr\u00f2nic separades per comes.<\/p>\n<p style=\"text-align: justify;\"><i>Exemple<\/i>:<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-194\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-15.png\" alt=\"\" width=\"521\" height=\"72\" \/><\/p>\n<p style=\"text-align: justify;\">L&#8217;acci\u00f3 t\u00edpica que els navegadors porten a terme quan fas clic en aquest vincle \u00e9s la d&#8217;obrir l&#8217;aplicaci\u00f3 de correu electr\u00f2nic per defecte i compondre un nou missatge amb la informaci\u00f3 prove\u00efda pel vincle. Per\u00f2 quan el sistema no posseeix un client de correu electr\u00f2nic predeterminat, l&#8217;activaci\u00f3 d&#8217;aquest vincle no t\u00e9 conseq\u00fc\u00e8ncies.<\/p>\n<p style=\"text-align: justify;\">Tamb\u00e9 hi ha la possibilitat de proveir informaci\u00f3 addicional per completar altres camps de l&#8217;e-mail, com Cc, Bcc, assumpte i cos. Per incloure un o m\u00e9s d&#8217;aquests camps al link necessites afegir, despr\u00e9s de la llista d&#8217;adreces de correu electr\u00f2nic, un signe d&#8217;interrogaci\u00f3 (&#8220;?&#8221;) I la llista de par\u00e0metres separats per un signe &#8220;&amp;&#8221;. Ara, cada un d&#8217;aquests par\u00e0metres tamb\u00e9 tenen una estructura espec\u00edfica, que consisteix del nom del par\u00e0metre (Cc, Bcc, subject, body) seguit per un s\u00edmbol igual (&#8220;=&#8221;) i el valor.<\/p>\n<p style=\"text-align: justify;\"><i>Exemple: <\/i><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-195\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-16.png\" alt=\"\" width=\"573\" height=\"101\" \/><\/p>\n<h1 style=\"text-align: justify;\">L\u2019element link<\/h1>\n<p style=\"text-align: justify;\">L&#8217;etiqueta &lt;link&gt; defineix un enlla\u00e7 entre un document i un recurs extern. <b>Sobretot, \u00a0s&#8217;utilitza per enlla\u00e7ar a fulls d&#8217;estils externs<\/b>. Per aquesta ra\u00f3 s\u00f3n <b>declarats al &lt;head&gt;<\/b> del document. <b>S\u00f3n vincles que queden ocults a l\u2019usuari<\/b>.<\/p>\n<p style=\"text-align: justify;\">Les moltes relacions que aquest element pot establir, depenen principalment del valor de l&#8217;atribut rel. En els casos m\u00e9s usuals defineix l&#8217;estructura del lloc web (document pr\u00f2xim o anterior), proveeix versions alternatives del document (per impressora, en un altre llenguatge, etc.) i apunta a recursos externs amb informaci\u00f3 d&#8217;estil per al document.<\/p>\n<p style=\"text-align: justify;\"><i>Exemple. Enlla\u00e7 a un document d\u2019estil extern.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-196\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-17.png\" alt=\"\" width=\"570\" height=\"44\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>La funci\u00f3 b\u00e0sica d&#8217;un vincle \u00e9s la de fer una refer\u00e8ncia, d&#8217;un document HTML a un recurs, que pot ser al seu torn un altre document. En altres paraules, un enlla\u00e7 defineix una relaci\u00f3 entre dos recursos a la web. Refer\u00e8ncia element a L\u2019element a L&#8217;element a pot ser utilitzat per inserir vincles dins del &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/\" class=\"more-link\">Continua llegint <span class=\"screen-reader-text\">\u00abEnlla\u00e7os\u00bb<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":65,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-188","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Enlla\u00e7os | HTML &amp; CSS<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/\" \/>\n<meta property=\"og:locale\" content=\"ca_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enlla\u00e7os | HTML &amp; CSS\" \/>\n<meta property=\"og:description\" content=\"La funci\u00f3 b\u00e0sica d&#8217;un vincle \u00e9s la de fer una refer\u00e8ncia, d&#8217;un document HTML a un recurs, que pot ser al seu torn un altre document. En altres paraules, un enlla\u00e7 defineix una relaci\u00f3 entre dos recursos a la web. Refer\u00e8ncia element a L\u2019element a L&#8217;element a pot ser utilitzat per inserir vincles dins del &hellip; Continua llegint \u00abEnlla\u00e7os\u00bb\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/\" \/>\n<meta property=\"og:site_name\" content=\"HTML &amp; CSS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bernatcortina\" \/>\n<meta property=\"og:image\" content=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@bernatcortina\" \/>\n<meta name=\"twitter:label1\" content=\"Temps estimat de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minuts\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/\",\"url\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/\",\"name\":\"Enlla\u00e7os | HTML &amp; CSS\",\"isPartOf\":{\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png\",\"datePublished\":\"2019-01-21T17:59:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#breadcrumb\"},\"inLanguage\":\"ca\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ca\",\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#primaryimage\",\"url\":\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png\",\"contentUrl\":\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inici\",\"item\":\"https:\/\/tutorial.bernatcortina.cat\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML\",\"item\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enlla\u00e7os\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/#website\",\"url\":\"https:\/\/tutorial.bernatcortina.cat\/\",\"name\":\"HTML &amp; CSS\",\"description\":\"Fonaments d&#039;HTML i full d&#039;estils\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tutorial.bernatcortina.cat\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ca\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enlla\u00e7os | HTML &amp; CSS","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/","og_locale":"ca_ES","og_type":"article","og_title":"Enlla\u00e7os | HTML &amp; CSS","og_description":"La funci\u00f3 b\u00e0sica d&#8217;un vincle \u00e9s la de fer una refer\u00e8ncia, d&#8217;un document HTML a un recurs, que pot ser al seu torn un altre document. En altres paraules, un enlla\u00e7 defineix una relaci\u00f3 entre dos recursos a la web. Refer\u00e8ncia element a L\u2019element a L&#8217;element a pot ser utilitzat per inserir vincles dins del &hellip; Continua llegint \u00abEnlla\u00e7os\u00bb","og_url":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/","og_site_name":"HTML &amp; CSS","article_publisher":"https:\/\/www.facebook.com\/bernatcortina","og_image":[{"url":"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@bernatcortina","twitter_misc":{"Temps estimat de lectura":"3 minuts"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/","url":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/","name":"Enlla\u00e7os | HTML &amp; CSS","isPartOf":{"@id":"https:\/\/tutorial.bernatcortina.cat\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#primaryimage"},"image":{"@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#primaryimage"},"thumbnailUrl":"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png","datePublished":"2019-01-21T17:59:46+00:00","breadcrumb":{"@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#breadcrumb"},"inLanguage":"ca","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/"]}]},{"@type":"ImageObject","inLanguage":"ca","@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#primaryimage","url":"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png","contentUrl":"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-10.png"},{"@type":"BreadcrumbList","@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/enllacos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Inici","item":"https:\/\/tutorial.bernatcortina.cat\/"},{"@type":"ListItem","position":2,"name":"HTML","item":"https:\/\/tutorial.bernatcortina.cat\/index.php\/html\/"},{"@type":"ListItem","position":3,"name":"Enlla\u00e7os"}]},{"@type":"WebSite","@id":"https:\/\/tutorial.bernatcortina.cat\/#website","url":"https:\/\/tutorial.bernatcortina.cat\/","name":"HTML &amp; CSS","description":"Fonaments d&#039;HTML i full d&#039;estils","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tutorial.bernatcortina.cat\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ca"}]}},"_links":{"self":[{"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/pages\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":0,"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/pages\/188\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/pages\/65"}],"wp:attachment":[{"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/media?parent=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}