{"id":124,"date":"2019-07-23T14:04:40","date_gmt":"2019-07-23T14:04:40","guid":{"rendered":"https:\/\/www.webhozz.com\/code\/?p=124"},"modified":"2019-09-03T11:51:11","modified_gmt":"2019-09-03T11:51:11","slug":"css-list","status":"publish","type":"post","link":"https:\/\/www.webhozz.com\/code\/css-list\/","title":{"rendered":"CSS : List"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Tipe HTML List<\/h4>\n\n\n\n<p>Terdapat tiga tipe list HTML, yaitu:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li> <strong>Unordered lists<\/strong> &#8212;&#8212; Daftar item, di mana setiap daftar item ditandai dengan peluru.<\/li><li> <strong>Ordered lists<\/strong> &#8212;&#8212; Daftar item, di mana setiap daftar item ditandai dengan angka.<\/li><li> <strong>Definition list<\/strong> &#8212;&#8212; Daftar item, dimana setiap itemnya di sertai dengan deskripsi.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Styling List dengan CSS<\/h4>\n\n\n\n<p>Secara default, item dalam <a href=\"https:\/\/www.tutorialrepublic.com\/html-tutorial\/html-lists.php#ordered-lists\">ordered list<\/a> diberi nomor dengan Arabic numerals (1, 2, 3, dll.), Sedangkan dalam <a href=\"https:\/\/www.tutorialrepublic.com\/html-tutorial\/html-lists.php#unordered-lists\">unordered list<\/a>, item ditandai dengan round bullets &nbsp;(peluru bundar). Tapi, kalian bisa mengubah jenis penanda daftar default ini ke jenis lain seperti lingkaran, kuadrat, angka romawi, huruf latin, dan sebagainya menggunakan properti list-style-type. Berikut contohnya:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\nul {\n    list-style-type: square;\n}\nol {\n    list-style-type: upper-roman;\n}\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Mengubah Posisi List Marker<\/h4>\n\n\n\n<p>List marker diposisikan di luar kotak daftar item, secara default. Namun, kalian dapat menggunakan properti list-style-position untuk menentukan apakah marker atau poin-poin muncul di dalam atau di luar daftar utama kotak blok. Properti ini mengambil nilai <code>inside<\/code>&nbsp;atau&nbsp;<code>outside<\/code>, dengan <code>outside<\/code> menjadi defaultnya. Berikut contohnya:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\nul.in li {\n    list-style-position: inside;\n}\nul.out li {\n    list-style-position: outside;\n}\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Menggunakan Gambar sebagai List Marker<\/h4>\n\n\n\n<p>Kalian juga dapat mengatur gambar sebagai list marker\nmenggunakan properti list-style-image.<\/p>\n\n\n\n<p>Aturan style dalam contoh berikut menetapkan gambar PNG transparan &#8220;arrow.png&#8221; sebagai list marker untuk semua item dalam unordered list.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\nul li {\n    list-style-image: url(&quot;arrow.png&quot;);\n}\n<\/pre><\/div>\n\n\n<p>Contoh di atas tidak menghasilkan output yang sama di semua browser. Internet Explorer dan Opera akan menampilkan image-marker sedikit lebih tinggi dari Firefox, Chrome, dan Safari. Di bawah ini merupakan solusi untuk mengatasi permasalahan tersebut.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Solusi untuk Image Marker Cross Browser  <\/h4>\n\n\n\n<p>Saat menggunakan gambar sebagai penanda dengan menggunakan\nproperti list-style-image,\npenanda tersebut tidak akan ditampilkan dengan seharusnya antara satu browser\ndengan browser yang lainnya. Sebagai solusi, kalian dapat menyelaraskan gambar\npenanda tersebut dengan benar melalui properti <a href=\"https:\/\/www.tutorialrepublic.com\/css-reference\/css-background-image-property.php\">background-image<\/a>\nCSS. Pertama, atur daftar agar tidak menggunakan penanda (list marker) apapun.\nKemudian, tentukan gambar latar yang tidak berulang untuk elemen daftarnya.<\/p>\n\n\n\n<p>Contoh berikut menampilkan penanda gambar secara merata di semua browser:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\nul {\n    list-style-type: none;\n}\nul li {\n    background-image: url(&quot;arrow.png&quot;);\n    background-position: 0px 5px;    \/* X-pos Y-pos (from top-left) *\/\n    background-repeat: no-repeat;\n    padding-left: 20px;\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Tipe HTML List Terdapat tiga tipe list HTML, yaitu: Unordered lists &#8212;&#8212; Daftar item, di mana setiap daftar item ditandai dengan peluru. Ordered lists &#8212;&#8212;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-124","post","type-post","status-publish","format-standard","hentry","category-css"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Belajar CSS : List - WebHozz Code<\/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:\/\/www.webhozz.com\/code\/css-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Belajar CSS : List - WebHozz Code\" \/>\n<meta property=\"og:description\" content=\"Tipe HTML List Terdapat tiga tipe list HTML, yaitu: Unordered lists &#8212;&#8212; Daftar item, di mana setiap daftar item ditandai dengan peluru. Ordered lists &#8212;&#8212;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhozz.com\/code\/css-list\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHozz Code\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-23T14:04:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-03T11:51:11+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/css-list\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/css-list\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/#\\\/schema\\\/person\\\/3b2b79dc317236b0dde4b1fda37263e1\"},\"headline\":\"CSS : List\",\"datePublished\":\"2019-07-23T14:04:40+00:00\",\"dateModified\":\"2019-09-03T11:51:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/css-list\\\/\"},\"wordCount\":295,\"articleSection\":[\"CSS\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/css-list\\\/\",\"url\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/css-list\\\/\",\"name\":\"Belajar CSS : List - WebHozz Code\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/#website\"},\"datePublished\":\"2019-07-23T14:04:40+00:00\",\"dateModified\":\"2019-09-03T11:51:11+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/#\\\/schema\\\/person\\\/3b2b79dc317236b0dde4b1fda37263e1\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/css-list\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webhozz.com\\\/code\\\/css-list\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/css-list\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS : List\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/#website\",\"url\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/\",\"name\":\"WebHozz Code\",\"description\":\"Tutorial Web &amp; Pemrograman Indonesia\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/#\\\/schema\\\/person\\\/3b2b79dc317236b0dde4b1fda37263e1\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f222cb0ed38f2100d666bb262fd38d4f0d8e5673698208e40ff83118f10a4e8e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f222cb0ed38f2100d666bb262fd38d4f0d8e5673698208e40ff83118f10a4e8e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f222cb0ed38f2100d666bb262fd38d4f0d8e5673698208e40ff83118f10a4e8e?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/www.webhozz.com\\\/code\\\/author\\\/dody\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Belajar CSS : List - WebHozz Code","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:\/\/www.webhozz.com\/code\/css-list\/","og_locale":"en_US","og_type":"article","og_title":"Belajar CSS : List - WebHozz Code","og_description":"Tipe HTML List Terdapat tiga tipe list HTML, yaitu: Unordered lists &#8212;&#8212; Daftar item, di mana setiap daftar item ditandai dengan peluru. Ordered lists &#8212;&#8212;","og_url":"https:\/\/www.webhozz.com\/code\/css-list\/","og_site_name":"WebHozz Code","article_published_time":"2019-07-23T14:04:40+00:00","article_modified_time":"2019-09-03T11:51:11+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webhozz.com\/code\/css-list\/#article","isPartOf":{"@id":"https:\/\/www.webhozz.com\/code\/css-list\/"},"author":{"name":"admin","@id":"https:\/\/www.webhozz.com\/code\/#\/schema\/person\/3b2b79dc317236b0dde4b1fda37263e1"},"headline":"CSS : List","datePublished":"2019-07-23T14:04:40+00:00","dateModified":"2019-09-03T11:51:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhozz.com\/code\/css-list\/"},"wordCount":295,"articleSection":["CSS"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.webhozz.com\/code\/css-list\/","url":"https:\/\/www.webhozz.com\/code\/css-list\/","name":"Belajar CSS : List - WebHozz Code","isPartOf":{"@id":"https:\/\/www.webhozz.com\/code\/#website"},"datePublished":"2019-07-23T14:04:40+00:00","dateModified":"2019-09-03T11:51:11+00:00","author":{"@id":"https:\/\/www.webhozz.com\/code\/#\/schema\/person\/3b2b79dc317236b0dde4b1fda37263e1"},"breadcrumb":{"@id":"https:\/\/www.webhozz.com\/code\/css-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhozz.com\/code\/css-list\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhozz.com\/code\/css-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhozz.com\/code\/"},{"@type":"ListItem","position":2,"name":"CSS : List"}]},{"@type":"WebSite","@id":"https:\/\/www.webhozz.com\/code\/#website","url":"https:\/\/www.webhozz.com\/code\/","name":"WebHozz Code","description":"Tutorial Web &amp; Pemrograman Indonesia","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhozz.com\/code\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.webhozz.com\/code\/#\/schema\/person\/3b2b79dc317236b0dde4b1fda37263e1","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f222cb0ed38f2100d666bb262fd38d4f0d8e5673698208e40ff83118f10a4e8e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f222cb0ed38f2100d666bb262fd38d4f0d8e5673698208e40ff83118f10a4e8e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f222cb0ed38f2100d666bb262fd38d4f0d8e5673698208e40ff83118f10a4e8e?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/www.webhozz.com\/code\/author\/dody\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/comments?post=124"}],"version-history":[{"count":3,"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":381,"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/posts\/124\/revisions\/381"}],"wp:attachment":[{"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/media?parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/categories?post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhozz.com\/code\/wp-json\/wp\/v2\/tags?post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}