{"id":7721,"date":"2019-04-07T11:35:08","date_gmt":"2019-04-07T15:35:08","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=7721"},"modified":"2021-12-07T17:08:24","modified_gmt":"2021-12-07T22:08:24","slug":"change-font-height-css-html","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/change-font-height-css-html\/","title":{"rendered":"How to Change font height and width in CSS and HTML"},"content":{"rendered":"\n

One of the most straightforward things to do when designing websites is to change font height and width either via CSS or directly in HTML<\/a>.\u00a0The only problem is that the traditional methods and the more modern conventions are to change the entire font size while maintaining the scaling.<\/p>\n\n\n\n

How about if you want to change the font height or width independently of each other? Enter CSS<\/a> to the rescue.<\/p>\n\n\n\n

There are four ways you can do this with ease using a choice of three values on the transform property on the font selector.<\/p>\n\n\n\n

Scale(value)<\/strong><\/p>\n\n\n\n

This example scales the width and height proportionally.<\/p>\n\n\n\n

elem {\n -ms-transform: scale(2); \/* IE 9 *\/\n -webkit-transform: scale(2); \/* Safari *\/\n transform: scale(2);\n }<\/code><\/pre>\n\n\n\n

The Shorthand Scale(width, height)<\/strong><\/p>\n\n\n\n

The example below increases the width by one and a half times while the width will shrink by half.<\/p>\n\n\n\n

elem {\n -ms-transform: scale(1.5, 0.5); \/* IE 9 *\/\n -webkit-transform: scale(1.5, 0.5); \/* Safari *\/\n transform: scale(1.5, 0.5);\n }<\/code><\/pre>\n\n\n\n

ScaleX<\/strong><\/p>\n\n\n\n

Scales the width.<\/p>\n\n\n\n

elem {\n -ms-transform: scaleX(0.5); \/* IE 9 *\/\n -webkit-transform: scaleX(0.5); \/* Safari *\/\n transform: scaleX(0.5);\n }<\/code><\/pre>\n\n\n\n

ScaleY<\/strong><\/p>\n\n\n\n

Scales the height.<\/p>\n\n\n\n

elem {\n -ms-transform: scaleY(1.5); \/* IE 9 *\/\n -webkit-transform: scaleY(1.5); \/* Safari *\/\n transform: scaleY(1.5);\n }<\/code><\/pre>\n\n\n\n

There you have it. That is how you can scale the height and width of the font using CSS on the HTML selectors.<\/p>\n\n\n\n

And that’s the tip for today.<\/p>\n","protected":false},"excerpt":{"rendered":"

One of the most straightforward things to do when designing websites is to change font height and width either via CSS or directly in HTML.\u00a0The only problem is that the…<\/p>\n","protected":false},"author":1,"featured_media":7722,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,27,16,17],"tags":[170,277,303,320,471,543,635,636,637,643],"yoast_head":"\nHere's how to Change font height and width in CSS and HTML<\/title>\n<meta name=\"description\" content=\"As a web designer a time comes when you have to be able to change the font height and width in your web page. This is how to do it\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/local.brightwhiz\/change-font-height-css-html\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Here's how to Change font height and width in CSS and HTML\" \/>\n<meta property=\"og:description\" content=\"As a web designer a time comes when you have to be able to change the font height and width in your web page. This is how to do it\" \/>\n<meta property=\"og:url\" content=\"http:\/\/local.brightwhiz\/change-font-height-css-html\/\" \/>\n<meta property=\"og:site_name\" content=\"Brightwhiz.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/brightwhiz\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-07T15:35:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-07T22:08:24+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Bright\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:site\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Bright\" \/>\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\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/\"},\"author\":{\"name\":\"Michael Bright\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\"},\"headline\":\"How to Change font height and width in CSS and HTML\",\"datePublished\":\"2019-04-07T15:35:08+00:00\",\"dateModified\":\"2021-12-07T22:08:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/\"},\"wordCount\":177,\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg\",\"keywords\":[\"CSS\",\"Google Fonts\",\"HTML\",\"Internet\",\"Programming\",\"Software Design\",\"Web\",\"Web Applications\",\"Web Design\",\"Websites\"],\"articleSection\":[\"Guides\",\"Programming\",\"Technology\",\"Tips\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/\",\"url\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/\",\"name\":\"Here's how to Change font height and width in CSS and HTML\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg\",\"datePublished\":\"2019-04-07T15:35:08+00:00\",\"dateModified\":\"2021-12-07T22:08:24+00:00\",\"description\":\"As a web designer a time comes when you have to be able to change the font height and width in your web page. This is how to do it\",\"breadcrumb\":{\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/local.brightwhiz\/change-font-height-css-html\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/#primaryimage\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg\",\"width\":1200,\"height\":630,\"caption\":\"Change font height CSS and HTML\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/local.brightwhiz\/change-font-height-css-html\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/local.brightwhiz\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change font height and width in CSS and HTML\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/local.brightwhiz\/#website\",\"url\":\"http:\/\/local.brightwhiz\/\",\"name\":\"Brightwhiz.com\",\"description\":\"Best Tech guides, Tutorials, and News\",\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/local.brightwhiz\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/local.brightwhiz\/#organization\",\"name\":\"Brightwhiz\",\"url\":\"http:\/\/local.brightwhiz\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"width\":706,\"height\":135,\"caption\":\"Brightwhiz\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/brightwhiz\/\",\"https:\/\/x.com\/brightwhizmag\",\"https:\/\/instagram.com\/bright_whiz\/\",\"https:\/\/www.pinterest.com\/sobbayi\/\",\"https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\",\"name\":\"Michael Bright\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"caption\":\"Michael Bright\"},\"sameAs\":[\"https:\/\/sobbayi.com\"],\"url\":\"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Here's how to Change font height and width in CSS and HTML","description":"As a web designer a time comes when you have to be able to change the font height and width in your web page. This is how to do it","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":"http:\/\/local.brightwhiz\/change-font-height-css-html\/","og_locale":"en_US","og_type":"article","og_title":"Here's how to Change font height and width in CSS and HTML","og_description":"As a web designer a time comes when you have to be able to change the font height and width in your web page. This is how to do it","og_url":"http:\/\/local.brightwhiz\/change-font-height-css-html\/","og_site_name":"Brightwhiz.com","article_publisher":"https:\/\/www.facebook.com\/brightwhiz\/","article_published_time":"2019-04-07T15:35:08+00:00","article_modified_time":"2021-12-07T22:08:24+00:00","og_image":[{"width":1200,"height":630,"url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg","type":"image\/jpeg"}],"author":"Michael Bright","twitter_card":"summary_large_image","twitter_creator":"@brightwhizmag","twitter_site":"@brightwhizmag","twitter_misc":{"Written by":"Michael Bright","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/#article","isPartOf":{"@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/"},"author":{"name":"Michael Bright","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32"},"headline":"How to Change font height and width in CSS and HTML","datePublished":"2019-04-07T15:35:08+00:00","dateModified":"2021-12-07T22:08:24+00:00","mainEntityOfPage":{"@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/"},"wordCount":177,"publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"image":{"@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg","keywords":["CSS","Google Fonts","HTML","Internet","Programming","Software Design","Web","Web Applications","Web Design","Websites"],"articleSection":["Guides","Programming","Technology","Tips"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/","url":"http:\/\/local.brightwhiz\/change-font-height-css-html\/","name":"Here's how to Change font height and width in CSS and HTML","isPartOf":{"@id":"http:\/\/local.brightwhiz\/#website"},"primaryImageOfPage":{"@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/#primaryimage"},"image":{"@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg","datePublished":"2019-04-07T15:35:08+00:00","dateModified":"2021-12-07T22:08:24+00:00","description":"As a web designer a time comes when you have to be able to change the font height and width in your web page. This is how to do it","breadcrumb":{"@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/local.brightwhiz\/change-font-height-css-html\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/#primaryimage","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2019\/04\/html5-fonts-1.jpg","width":1200,"height":630,"caption":"Change font height CSS and HTML"},{"@type":"BreadcrumbList","@id":"http:\/\/local.brightwhiz\/change-font-height-css-html\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/local.brightwhiz\/"},{"@type":"ListItem","position":2,"name":"How to Change font height and width in CSS and HTML"}]},{"@type":"WebSite","@id":"http:\/\/local.brightwhiz\/#website","url":"http:\/\/local.brightwhiz\/","name":"Brightwhiz.com","description":"Best Tech guides, Tutorials, and News","publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/local.brightwhiz\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/local.brightwhiz\/#organization","name":"Brightwhiz","url":"http:\/\/local.brightwhiz\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","width":706,"height":135,"caption":"Brightwhiz"},"image":{"@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/brightwhiz\/","https:\/\/x.com\/brightwhizmag","https:\/\/instagram.com\/bright_whiz\/","https:\/\/www.pinterest.com\/sobbayi\/","https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ"]},{"@type":"Person","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32","name":"Michael Bright","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","caption":"Michael Bright"},"sameAs":["https:\/\/sobbayi.com"],"url":"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/"}]}},"_links":{"self":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/7721"}],"collection":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/comments?post=7721"}],"version-history":[{"count":0,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/7721\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media\/7722"}],"wp:attachment":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media?parent=7721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/categories?post=7721"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/tags?post=7721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}