{"id":14710,"date":"2020-04-15T12:22:55","date_gmt":"2020-04-15T19:22:55","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=14710"},"modified":"2023-12-01T02:37:40","modified_gmt":"2023-12-01T10:37:40","slug":"css-list-style","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/css-list-style\/","title":{"rendered":"CSS List Style"},"content":{"rendered":"\n<p>Lists are an important way to display data in HTML. When you have a number of items with a common theme, such as shoe sizes or navigation tools, the most effective way to present the data may be to use a list.<br><\/p>\n\n\n\n<p>By default, lists in HTML are quite plain. That\u2019s where the CSS list-style property comes in. The list-style property and its sub properties are used to customize lists to complement your unique website design.<br><\/p>\n\n\n\n<p>This tutorial will cover, with examples, how to style lists in CSS using the list-style property and its sub properties. It will also cover how to set the background colors of a list and its items. After reading this tutorial, you\u2019ll be an expert at styling lists using CSS.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">HTML and CSS Lists<\/h2>\n\n\n\n<p>Lists are used to show a number of connected items. In HTML, there are three types of lists you can use to present data. These are:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Unordered lists<\/strong> (&lt;ul&gt;) &#8211; A list of items whose values are marked using bullet points.<\/li>\n\n\n\n<li><strong>Ordered lists<\/strong> (&lt;ol&gt;) &#8211; A list of items whose values are marked using an ordering system (for example, sequential numbers or letters).<\/li>\n\n\n\n<li><strong>Definition lists<\/strong> (&lt;dl&gt;) &#8211; A list of items with accompanying descriptions.<\/li>\n<\/ul>\n\n\n\n<p>If you\u2019re interested in learning more about HTML lists, read our article on <a href=\"https:\/\/careerkarma.com\/blog\/html-lists\/\">lists in HTML<\/a>.&nbsp;<br><\/p>\n\n\n\n<p>Each of the above list types come with its own default HTML style. Additionally, CSS offers a number of properties you can use to make your lists more aesthetically pleasing and better aligned with your style guide.<br><\/p>\n\n\n\n<p>The CSS list properties allow you to:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change the item markers for ordered lists.<\/li>\n\n\n\n<li>Change the item markers for unordered lists.<\/li>\n\n\n\n<li>Set an image as a list item marker.<\/li>\n\n\n\n<li>Add background colors to lists and their items.<\/li>\n<\/ul>\n\n\n\n<p>In this tutorial, we will discuss two overarching ways to style lists in CSS: the list-style property via its individual sub properties, and the list-style shorthand property. The sub properties of the list-style property are:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>list-style-type<\/li>\n\n\n\n<li>list-style-position<\/li>\n\n\n\n<li>list-style-image<\/li>\n<\/ul>\n\n\n\n<p>The list-style shorthand property is written as:&nbsp;<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>list-style: [list-style-type] [list-style-position] [list-style-image]; <\/pre><\/div>\n\n\n\n<p>We will also discuss how to add background colors to lists and list items.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Basic HTML List Example<\/h2>\n\n\n\n<p>First, let\u2019s look at an example of a list in HTML. Suppose a local bakery asks us to create a web page that includes a list of recipes for customers\u2019 home use.&nbsp;<br><\/p>\n\n\n\n<p>Here is the basic HTML code we will use to define our list:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;ul&gt;\n\t&lt;li&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre><\/div>\n\n\n\n<p>Our list appears as follows:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/DRmxyLf6X-UzHiYBeNYycZ8X_-B4ofynIygWfDnrwmQ0EQeGuKgpOK7XtTSwFvYIhWsnuHQw4REY9uIwTeJRDP0Brg575zHTAtZ1aWC1ROv7Qm_zmsbYcQi8_dZBZg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Our list contains five items. We enclose each list item within <code>&lt;li&gt;<\/code> tags. (&#8220;li&#8221; stands for &#8220;list item.&#8221;) We enclose these <code>&lt;li&gt;<\/code> tags within a <code>&lt;ul&gt;<\/code> tag. The <code>&lt;ul&gt;<\/code> tag identifies an unordered list.&nbsp;<br><\/p>\n\n\n\n<p>Since this is an unordered list, our web browser places a bullet point before each of the items in the list. (If it were an ordered list, our web browser would place an orderable value\u2014usually a number or a letter\u2014before each item in the list.)<br><\/p>\n\n\n\n<p>Now, let\u2019s explore how we can style a list using the list-style property.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">List Item Markers<\/h2>\n\n\n\n<p>The list-style-type property is used to specify the type of marker used for items in a list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Unordered List Item Markers<\/h3>\n\n\n\n<p>Suppose the bakery asks us to show what their list would look like with a circle bullet point versus a square bullet point preceding each list item. We can use the following code to create these designs for the bakery:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>styles.css\nli.circlebulletPoint {\n\tlist-style-type: circle;\n}\nli.squarebulletPoint {\n\tlist-style-type: square;\n}\nindex.html\n&lt;ul&gt;\n\t&lt;li class=\"circlebulletPoint\"&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li class=\"squarebulletPoint\"&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre><\/div>\n\n\n\n<p>Our code returns:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/dKz-UivEElDA7xrSkIA_It2Od_JjnTbH7NR2PKRKVzYBgYgQ1SFo6d-hJjXVNSDWaApg-ZE5p7_p5ezUz2-NcZ7m3-luwxIyvmTMGoBObbJpH8tQ2xWTUl5snIuUsQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>As you can see, our first list item uses the circle bullet point marker style. We accomplished this by assigning the class value &#8220;circlebulletPoint&#8221;\u2014and therefore that value\u2019s corresponding style\u2014to our first list item. We assigned the class value &#8220;squarebulletPoint&#8221; to our second list item, so the web browser displays a square bullet point before that item.&nbsp;<br><\/p>\n\n\n\n<p>There are other list-style-types which can be applied to a list, which are:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>disc<\/li>\n\n\n\n<li>circle<\/li>\n\n\n\n<li>decimal<\/li>\n\n\n\n<li>decimal-leading-zero<\/li>\n\n\n\n<li>lower-roman<\/li>\n\n\n\n<li>upper-roman<\/li>\n\n\n\n<li>lower-greek<\/li>\n\n\n\n<li>lower-latin<\/li>\n\n\n\n<li>upper-latin<\/li>\n\n\n\n<li>armenian<\/li>\n\n\n\n<li>georgian<\/li>\n\n\n\n<li>lower-alpha<\/li>\n\n\n\n<li>none<\/li>\n<\/ul>\n\n\n\n<p>We discuss a few of these that apply to ordered lists in the next section.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Ordered List Item Markers<\/h3>\n\n\n\n<p>Ordered lists have their own item marker styles.<br><\/p>\n\n\n\n<p>Suppose we want the bakery\u2019s recipes to be displayed in an ordered list. We want to see what our list would look like with its order marked by a lowercase alphabetical letter preceding each item in the list, and what it would look like with an uppercase Roman numeral preceding each item in the list. We could use the following code to accomplish this task:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>styles.css\nli.alpha {\n\tlist-style-type: lower-alpha;\n}\nli.roman {\n\tlist-style-type: upper-roman;\n}\nindex.html\n&lt;ol&gt;\n\t&lt;li class=\"alpha\"&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li class=\"roman\"&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ol&gt;<\/pre><\/div>\n\n\n\n<p>Our code returns:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/_tMinXncgSzT8o1t1o4DzLNT6cTOO1T_3AeS_n9ZEX3k5U_N52yMirGi8-njDC71iFkc2DY0cNcLoo_x1zmK1iS4tEiiFwlkuRHlVK-WDU0QKXCWzP83BWA0lfEspQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>In this example, we used an ordered list (&lt;ol&gt;) instead of an unordered list. This allows us to order our list with numbers (or letters, etc.). Then, we marked the first item in our list with a lowercase alphabetical letter and the second item in our list with an uppercase Roman numeral.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Remove Default List Item Marker Styling<\/h2>\n\n\n\n<p>There are three CSS properties we can use in our code to remove aspects of default styling from a list: list-style-type, margin, and padding.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting list-style-type to None<\/h3>\n\n\n\n<p>If we don\u2019t want any sort of bullet point or ordinal indicator (like a number or letter) before list items, we can set the list-style-type property to none. Here\u2019s an example of using this property to remove any bullet point or ordinal indicators in a list:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>styles.css\nul {\n\tlist-style-type: none;\n}\nindex.html\n&lt;ul&gt;\n\t&lt;li&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre><\/div>\n\n\n\n<p>Our code returns:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/z-Nzez4J6cZVxNsfRKPBxSisAUnfAVm7AWO-yQSwzSRpfe5qcClRV1KDXWuQh-4tZeojmnKyT7TE3eWLiLQVMMSL-BX5DigPplwZlvpQBZdoeApnobvHGnEwkedBKA\" alt=\"\"\/><\/figure>\n\n\n\n<p>Our list is still structured as a list, but when displayed on the web page, the list\u2019s items lack markers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Marker Position<\/h2>\n\n\n\n<p>The list-style-position property is used to specify the position of the list item markers in a list.<br><\/p>\n\n\n\n<p>There are two positions in which the item markers for a list can appear: inside and outside. If the list markers appear inside the list, the text will appear directly next to the item markers; if the list markers appear outside the list, there will be a gap between the list markers and the text items in the list.<br><\/p>\n\n\n\n<p>Here are two example CSS rules which demonstrate how the list-style-position can be applied in both of these states:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ul.a {\n\tlist-style-position: outside;\n}\nul.b {\n\tlist-style-position: inside;\n}<\/pre><\/div>\n\n\n\n<p>In our first list, we used the list-style-position: outside style. This is the default style applied to lists. As such, had we not specified this or any other list-style-position in our block of code, the browser would have defaulted to this positioning for list item markers. The following is the code for our bakery list that uses this style:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;ul class=\"a\"&gt;\n\t&lt;li&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre><\/div>\n\n\n\n<p>The code returns:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/X4387RfCv8lfqVBCCLGFmSkFou7KzpSdHDgTMJKwjlksODRF7IcQt1dL87WeEku4iYvXC5FX5XaL8dPn6wYctU93r-aDyw0hFQ2x_BI2lEHy_8txhcwX2bAmwnc5IA\" alt=\"\"\/><\/figure>\n\n\n\n<p>In this style, list item markers (in this case, bullet points) appear outside of our list items.<br><\/p>\n\n\n\n<p>In our second list, we have specified the position of our list item markers as &#8220;inside.&#8221; The following is the code for our bakery list that uses this style:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;ul class=\"b\"&gt;\n\t&lt;li&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre><\/div>\n\n\n\n<p>The code returns:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/HbmP66LaxX8yyu8qIbc0IBKTbQ84XkSqP-_kADbuxV9UropXwALSk3l5jn4rZX484QQXnhK7FUTTukS3P4sPV-YcQ4DUyvSOPjQgQw2kiJff14wrylqcl384nZ8vbA\" alt=\"\"\/><\/figure>\n\n\n\n<p>It&#8217;s hard to tell but the position of our list item markers is now outside the list item.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Image Marker<\/h2>\n\n\n\n<p>Lists often use custom markers with images. If you want to set the marker for a list item to an image, you can use the list-style-image CSS property.<br><\/p>\n\n\n\n<p>Suppose the bakery asks us to change the list item markers in their list to images of a cake (instead of a bullet point, number, etc.). We can use the following code to accomplish this task:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>styles.css\nul {\n\tlist-style-image: url(\"https:\/\/img.icons8.com\/small\/16\/000000\/cake.png\");\n}\nindex.html\n&lt;ul&gt;\n\t&lt;li&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre><\/div>\n\n\n\n<p>Our code returns:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/pgsGzWcpkFCf73iHuF0gbJ-NcErQ5LWqP1AGy91weR5WgmcdRCCIkLGmhSdwf3MEYqhQKIGc6qkQlBHYrVf8BNiQHz990Q4o1gp_tiQKzdjiv0aPyja3RPmmvi2Fqw\" alt=\"\"\/><\/figure>\n\n\n\n<p>As you can see, instead of using a default list item marker, we used our own. In this case, our list item marker is an image of a cake.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">List Style Shorthand Property<\/h2>\n\n\n\n<p>We have been discussing the sub properties of the list-style property. These have allowed us to apply individual styles to our list.<br><\/p>\n\n\n\n<p>However, there is a more efficient way of styling lists. Instead of using each individual subproperty to style a list, we can use the list-style shorthand property. Here is the syntax for the list-style shorthand property:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ul {\n\tlist-style: [list-style-type] [list-style-position] [list-style-image];<\/pre><\/div>\n\n\n\n<p>The order of values specified above is the order you need to use with the list-style shorthand property. If you do not specify a value for one of the three sub properties that make up the shorthand syntax, the web browser will use that subproperty\u2019s default value.&nbsp;<br><\/p>\n\n\n\n<p>Suppose we want to style our list of baked goods recipes with a cake image and also move each list item marker to the outside of our list. We can do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>styles.css\nul {\n\tlist-style: outside url('https:\/\/img.icons8.com\/small\/16\/000000\/cake.png');\n}\nindex.html\n&lt;ul&gt;\n\t&lt;li&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre><\/div>\n\n\n\n<p>Our code returns:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/oZhSIvQOEa-LeV4h5S0mAsuWXxv__PMgh1EvEstShMV_1_g7yVI3Tc5x5Uo7MWCsqeGNzqwEoYhs2FZFh8KP25oYsJ6JSnDiUgjM_dZm6NNyM0HRyoe-xL9gLx0oIg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Our list now uses the cake image for each list item marker. In addition, each list item marker is styled outside our list.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CSS List Colors<\/h2>\n\n\n\n<p>When you\u2019re designing a list, you may decide that you want the list to display background colors.<br><\/p>\n\n\n\n<p>Suppose the bakery asks us to set the background color of the entire list to light blue and to use a pink background color for each item in the list. We can use the CSS background property to accomplish this task, like so:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ul {\n\tbackground: lightblue;\n\tpadding: 10px;\n}\nul li {\n\tbackground: pink;\n\tmargin: 10px;\n}<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;ul&gt;\n\t&lt;li&gt;Butterfly Cakes&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Traybake&lt;\/li&gt;\n\t&lt;li&gt;Lemon Pound Cake&lt;\/li&gt;\n\t&lt;li&gt;Peanut Butter Flapjacks&lt;\/li&gt;\n\t&lt;li&gt;Chocolate Muffins&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre><\/div>\n\n\n\n<p>In our code, we applied a light blue background color using the background property to the <code>&lt;ul&gt;<\/code> element, which creates an unordered list. We also gave the <code>&lt;ul&gt;<\/code> element a 10px padding using the padding property.<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/brmpUxirsPxqwx_A3rQ2qRQTCNGUH3rmn7RZSnohZ7kcLh2KRbH3JGJWzW1NeHTnApl4h0keJIMWYBP-j8xN2EDS8ojo5ra9t58r2mOy9b1DDFVIuRYLg460R5Q54A\" alt=\"\"\/><\/figure>\n\n\n\n<p>We also applied a pink background to and created a 10px margin around each list item.&nbsp;<br><\/p>\n\n\n\n<p>We accomplished this by including our styles in a &#8220;ul li&#8221; selector, as you can see above. This selector states that the pink background and 10px margin should be applied to all <code>&lt;li&gt;<\/code> tags enclosed within a <code>&lt;ul&gt;<\/code> tag.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>When you\u2019re working with HTML lists, you can use CSS to apply custom styles to those lists to make them more aesthetically pleasing. The list-style property is used to apply styles to (or remove styles from) a list in CSS.<br><\/p>\n\n\n\n<p>This tutorial discussed, with examples, how to use the CSS list-style property and its three sub properties. We also discussed how to set background colors for a list and the items within it.<br><\/p>\n\n\n\n<p>Now you have the knowledge you need to start styling lists in CSS like a pro!<\/p>\n","protected":false},"excerpt":{"rendered":"Lists are an important way to display data in HTML. When you have a number of items with a common theme, such as shoe sizes or navigation tools, the most effective way to present the data may be to use a list. By default, lists in HTML are quite plain. That\u2019s where the CSS list-style&hellip;","protected":false},"author":240,"featured_media":14711,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17287],"tags":[],"class_list":{"0":"post-14710","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-css"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"CSS","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":"","is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>CSS List Style: The Complete Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Styling lists is an important part of web design. On Career Karma, learn how to style lists using the list-style property in CSS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/css-list-style\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CSS List Style\" \/>\n<meta property=\"og:description\" content=\"Styling lists is an important part of web design. On Career Karma, learn how to style lists using the list-style property in CSS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/css-list-style\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-15T19:22:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T10:37:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/business-code-coding-computer-270632.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"CSS List Style\",\"datePublished\":\"2020-04-15T19:22:55+00:00\",\"dateModified\":\"2023-12-01T10:37:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/\"},\"wordCount\":1667,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/business-code-coding-computer-270632.jpg\",\"articleSection\":[\"CSS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/\",\"name\":\"CSS List Style: The Complete Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/business-code-coding-computer-270632.jpg\",\"datePublished\":\"2020-04-15T19:22:55+00:00\",\"dateModified\":\"2023-12-01T10:37:40+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Styling lists is an important part of web design. On Career Karma, learn how to style lists using the list-style property in CSS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/business-code-coding-computer-270632.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/business-code-coding-computer-270632.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css-list-style\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/css\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CSS List Style\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/jamesgallagher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"CSS List Style: The Complete Guide | Career Karma","description":"Styling lists is an important part of web design. On Career Karma, learn how to style lists using the list-style property in 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:\/\/careerkarma.com\/blog\/css-list-style\/","og_locale":"en_US","og_type":"article","og_title":"CSS List Style","og_description":"Styling lists is an important part of web design. On Career Karma, learn how to style lists using the list-style property in CSS.","og_url":"https:\/\/careerkarma.com\/blog\/css-list-style\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-04-15T19:22:55+00:00","article_modified_time":"2023-12-01T10:37:40+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/business-code-coding-computer-270632.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"CSS List Style","datePublished":"2020-04-15T19:22:55+00:00","dateModified":"2023-12-01T10:37:40+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/"},"wordCount":1667,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/business-code-coding-computer-270632.jpg","articleSection":["CSS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/css-list-style\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/","url":"https:\/\/careerkarma.com\/blog\/css-list-style\/","name":"CSS List Style: The Complete Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/business-code-coding-computer-270632.jpg","datePublished":"2020-04-15T19:22:55+00:00","dateModified":"2023-12-01T10:37:40+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Styling lists is an important part of web design. On Career Karma, learn how to style lists using the list-style property in CSS.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/css-list-style\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/business-code-coding-computer-270632.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/business-code-coding-computer-270632.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/css-list-style\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"CSS","item":"https:\/\/careerkarma.com\/blog\/css\/"},{"@type":"ListItem","position":3,"name":"CSS List Style"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/14710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=14710"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/14710\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/14711"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=14710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=14710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=14710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}