{"id":316,"date":"2019-09-16T08:26:05","date_gmt":"2019-09-16T08:26:05","guid":{"rendered":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/?p=316"},"modified":"2019-09-16T08:26:07","modified_gmt":"2019-09-16T08:26:07","slug":"css-properties-for-typography","status":"publish","type":"post","link":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/2019\/09\/16\/css-properties-for-typography\/","title":{"rendered":"CSS Properties for Typography"},"content":{"rendered":"\n<p>These are some of the more commonly used properties for typography and creating typographic hierarchy.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Font (Typeface):&nbsp;<\/strong><\/h4>\n\n\n\n<p>This controls the font that is used.&nbsp;Also see the information on fonts in the CSS section of the Web Design Resources.&nbsp;<\/p>\n\n\n\n<p><strong>CSS Property<\/strong>:&nbsp;font-family<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Example:<\/strong>&nbsp;font-family:&nbsp;\"pt sans\",&nbsp;sans-serif;<\/pre>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-family\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-family<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Font Weight<\/strong><\/h4>\n\n\n\n<p>This controls the weight (boldness and lightness) of the font. The possible values are 100, 200, 300, 400, 500, 600, 700, 800, 900. You can also specify bold, normal, light but it is better to be specific and use the numbers. 100 is extra light, &nbsp;and 400 is normal,&nbsp;and 900 is extra bold.<\/p>\n\n\n\n<p><strong>CSS Property<\/strong>: font-weight<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Example<\/strong>:&nbsp;font-weight: 700;<\/pre>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-weight\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-weight<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Font Size<\/strong><\/h4>\n\n\n\n<p>This is how big the font is. When designing responsive sites generally it&#8217;s better to specify fonts in em or rem units. More on that in another section.<\/p>\n\n\n\n<p><strong>CSS Property<\/strong>: font-size<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Example<\/strong>:\u00a0font-size: 2em;<\/pre>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-size\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-size<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Font Style<\/strong><\/h4>\n\n\n\n<p>This allows you to make text italic.<\/p>\n\n\n\n<p><strong>CSS Property:<\/strong>&nbsp;font-style<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Example<\/strong>:\u00a0font-style: italic;<\/pre>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-style\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-style<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Line Height<\/strong><\/h4>\n\n\n\n<p>This controls the space between lines of text. This is one of the few properties where you can give a&nbsp;unitless&nbsp;value. If you just write a number it will multiply that by the font-size that has been set.<\/p>\n\n\n\n<p><strong>CSS Property<\/strong>: line-height<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Example<\/strong>:\u00a0line-height: 1.5;<\/pre>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/line-height\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/line-height<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Color<\/strong><\/h4>\n\n\n\n<p>Changes the color of the text. The color can be specified in a number of ways from named colors (red, green, blue) to hexadecimal numbers #FF8800 to&nbsp;rgba&nbsp;values&nbsp;rgba( 34, 12, 64, 0.3)<\/p>\n\n\n\n<p><strong>CSS Property:<\/strong>\u00a0color<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Example<\/strong>:&nbsp;color: #ff4400;<\/pre>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/color\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/color<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Background Color<\/h4>\n\n\n\n<p>This changes the color of the background. This combined with color defines the contrast of the color of the text and the background color. It can take the same values as color.<\/p>\n\n\n\n<p><strong>CSS Property<\/strong>: background-color<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Example<\/strong>:&nbsp;background-color: #ffffff;<\/pre>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/background-color\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/background-color<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Alignment<\/strong><\/h4>\n\n\n\n<p>Here you control if the text is aligned left, right, centered or justified.<\/p>\n\n\n\n<p><strong>CSS Property<\/strong>: text-align<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Example<\/strong>:&nbsp;text-align: justify;<\/pre>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/text-align\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/text-align<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Case<\/strong><\/h4>\n\n\n\n<p>This allows you to force your text to be uppercase or lower case or capitalize (like a title or name)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>CSS Property:<\/strong>&nbsp;text-transform<\/pre>\n\n\n\n<p><strong>Example<\/strong>:&nbsp;text-transform: uppercase;<\/p>\n\n\n\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/text-transform\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/text-transform<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These are some of the more commonly used properties for typography and creating typographic hierarchy. Font (Typeface):&nbsp; This controls the font that is used.&nbsp;Also see the information on fonts in the CSS section of the Web Design Resources.&nbsp; CSS Property:&nbsp;font-family Example:&nbsp;font-family:&nbsp;&#8220;pt sans&#8221;,&nbsp;sans-serif; https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/font-family Font Weight This controls the weight (boldness and lightness) of the font. [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"portfolio_post_id":0,"portfolio_citation":"","portfolio_annotation":"","openlab_post_visibility":"","footnotes":""},"categories":[10,7,48],"tags":[28,46,54],"class_list":{"0":"post-316","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-css","7":"category-resource","8":"category-typography","9":"tag-css","10":"tag-typographic-hierarchy","11":"tag-typography","12":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":4,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":333,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/posts\/316\/revisions\/333"}],"wp:attachment":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-240-fall-19-stein\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}