{"id":440,"date":"2022-05-24T20:53:28","date_gmt":"2022-05-24T20:53:28","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=440"},"modified":"2022-05-24T20:53:30","modified_gmt":"2022-05-24T20:53:30","slug":"css-text-transform","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/css-text-transform\/","title":{"rendered":"CSS Text Transform"},"content":{"rendered":"<p>This property can be used to transform the text to uppercase, lowercase, or capitalize the text.<\/p>\n<p>text-transform: uppercase; &#8211; this makes the text uppercase.<br \/>\ntext-transform: lowercase; &#8211; this makes the text lowercase.<br \/>\ntext-transform: capitalize; &#8211; this makes the first letter of every word capital.<\/p>\n<p>Here is the code for text-transform. Here, you can see that we are making the text uppercase. You can also try doing the lowercase or capitalizing the text.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-447 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform.jpg\" alt=\"\" width=\"480\" height=\"266\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform.jpg 480w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-300x166.jpg 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><br \/>\nOutput (as you might have guessed) &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-448 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-1.jpg\" alt=\"\" width=\"1023\" height=\"146\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-1.jpg 1023w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-1-300x43.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-1-768x110.jpg 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/>Also, let&#8217;s try doing some lowercase and capital as well. In the below code, we are just trying to get the text in the lowercase first. Doing lowercase does exactly the same as you might have thought of, it just transforms the text to lower case, and when we do capitalize, the first letter of every word becomes capital. Let&#8217;s have a look now &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-449 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-2.jpg\" alt=\"\" width=\"488\" height=\"269\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-2.jpg 488w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-2-300x165.jpg 300w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/>Output, as you might have seen &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-450 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-3.jpg\" alt=\"\" width=\"1023\" height=\"119\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-3.jpg 1023w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-3-300x35.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-3-768x89.jpg 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/>Now, let&#8217;s try to capitalize the text &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-451 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-4.jpg\" alt=\"\" width=\"516\" height=\"258\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-4.jpg 516w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-4-300x150.jpg 300w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/>The output, as you might have guessed again-<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-452 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-5.jpg\" alt=\"\" width=\"1023\" height=\"101\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-5.jpg 1023w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-5-300x30.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/04\/text-transform-5-768x76.jpg 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This property can be used to transform the text to uppercase, lowercase, or capitalize the text. text-transform: uppercase; &#8211; this makes the text uppercase. text-transform: lowercase; &#8211; this makes the text lowercase. text-transform: capitalize; &#8211; this makes the first letter of every word capital. Here is the code for text-transform. Here, you can see that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[9,13],"class_list":{"0":"post-440","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-css-tutorial","7":"tag-css","8":"tag-css-tutorial"},"_links":{"self":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/comments?post=440"}],"version-history":[{"count":3,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":1430,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/440\/revisions\/1430"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}