<br />
<b>Warning</b>:  Undefined array key "global_protection_id" in <b>/home/wikitechy/public_html/interview-questions/wp-content/plugins/content-protector/inc/class-ps-rest-handler.php</b> on line <b>51</b><br />
{"id":5056,"date":"2022-10-26T12:01:25","date_gmt":"2022-10-26T12:01:25","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=5056"},"modified":"2024-02-29T13:36:10","modified_gmt":"2024-02-29T13:36:10","slug":"how-to-align-text-in-html","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/","title":{"rendered":"How to Align Text in HTML ?"},"content":{"rendered":"<ul>\n<li>By using markup language, HTML is used to design webpages.<\/li>\n<li>It defines the link between the webpages.<\/li>\n<li>It defines the structure of webpages where markup language is used to define the text document within tag.<\/li>\n<li>In required format HTML is used by the browser to manipulate text, images, and other content to display.<\/li>\n<li>By using the text-align property, we can change the alignment of the text.<\/li>\n<li>We can align the text in the Left, Right and Center.<\/li>\n<li>The text alignment can be done with\u00a0HTML Attribute tag and Cascade Style Sheet.<\/li>\n<li>In Webpage, HTML allows the use of these CSS to perform changes in the style of the content.<\/li>\n<li>If you are in the market for watches <a href=\"https:\/\/replicarichardmille.io\" target=\"_blank\" rel=\"noopener\">Replica Richard Mille<\/a><\/li>\n<\/ul>\n<h2 id=\"align-text-to-left\">Align text to left<\/h2>\n<h3 id=\"sample-code\">Sample Code<\/h3>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;!DOCTYPE html&gt;<br\/>&lt;html&gt;<br\/>&lt;body&gt;<br\/><br\/>&lt;h1 style=&quot;text-align:left;&quot;&gt;Welcome to Wikitechy&lt;\/h1&gt;<br\/>&lt;p style=&quot;text-align:left;&quot;&gt;Hi this is Venkat .&lt;\/p&gt;<br\/><br\/>&lt;\/body&gt;<br\/>&lt;\/html&gt;<\/code><\/pre> <\/div>\n<h3 id=\"output\">Output<\/h3>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-5057\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png\" alt=\"\" width=\"1287\" height=\"540\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png 1287w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left-300x126.png 300w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left-1024x430.png 1024w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left-768x322.png 768w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left-390x164.png 390w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left-820x344.png 820w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left-1180x495.png 1180w\" sizes=\"(max-width: 1287px) 100vw, 1287px\" \/><\/p>\n<h2 id=\"align-text-to-right\">Align text to Right<\/h2>\n<h3 id=\"sample-code-2\">\u00a0Sample Code<\/h3>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;!DOCTYPE html&gt;<br\/>&lt;html&gt;<br\/>&lt;body&gt;<br\/><br\/>&lt;h1 style=&quot;text-align:right;&quot;&gt;Welcome to Wikitechy&lt;\/h1&gt;<br\/>&lt;p style=&quot;text-align:right;&quot;&gt;Hi this is Venkat .&lt;\/p&gt;<br\/><br\/>&lt;\/body&gt;<br\/>&lt;\/html&gt;<\/code><\/pre> <\/div>\n<h3 id=\"output-2\">Output<\/h3>\n<h3 id=\"\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5058\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-right.png\" alt=\"\" width=\"1286\" height=\"601\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-right.png 1286w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-right-300x140.png 300w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-right-1024x479.png 1024w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-right-768x359.png 768w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-right-390x182.png 390w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-right-820x383.png 820w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-right-1180x551.png 1180w\" sizes=\"(max-width: 1286px) 100vw, 1286px\" \/><\/h3>\n<h2 id=\"align-text-to-center\">Align text to Center<\/h2>\n<h3 id=\"sample-code-3\">Sample Code<\/h3>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;!DOCTYPE html&gt;<br\/>&lt;html&gt;<br\/>&lt;body&gt;<br\/><br\/>&lt;h1 style=&quot;text-align:center;&quot;&gt;Welcome to Wikitechy&lt;\/h1&gt;<br\/>&lt;p style=&quot;text-align: center;&quot;&gt;Hi this is Venkat .&lt;\/p&gt;<br\/><br\/>&lt;\/body&gt;<br\/>&lt;\/html&gt;<\/code><\/pre> <\/div>\n<h3 id=\"output-3\">Output<\/h3>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-5059\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-center.png\" alt=\"\" width=\"1289\" height=\"547\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-center.png 1289w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-center-300x127.png 300w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-center-1024x435.png 1024w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-center-768x326.png 768w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-center-390x166.png 390w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-center-820x348.png 820w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-center-1180x501.png 1180w\" sizes=\"(max-width: 1289px) 100vw, 1289px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By using markup language, HTML is used to design webpages. It defines the link between the webpages. It defines the structure of webpages where markup language is used to define the text document within tag. In required format HTML is used by the browser to manipulate text, images, and other content to display. By using [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"passster_activate_protection":false,"passster_protect_child_pages":"","passster_protection_type":"password","passster_password":"","passster_activate_overwrite_defaults":"","passster_headline":"","passster_instruction":"","passster_placeholder":"","passster_button":"","passster_id":"","passster_activate_misc_settings":"","passster_redirect_url":"","passster_hide":"no","passster_area_shortcode":"","gtb_hide_title":false,"gtb_wrap_title":false,"gtb_class_title":"","gtb_remove_headerfooter":false,"footnotes":""},"categories":[19019],"tags":[19045,19044,19047,19051,19043,19050,19048,19052,19049,19046,19053],"class_list":["post-5056","post","type-post","status-publish","format-standard","hentry","category-html","tag-css-text-alignment-and-text-direction","tag-css-text-align-property","tag-css-text-justify-property","tag-how-to-align-text-in-css","tag-how-to-align-text-in-html","tag-how-to-align-text-in-html-by-pixels","tag-how-to-align-text-in-html-using-css","tag-how-to-align-text-in-html-without-css","tag-how-to-align-text-side-by-side-in-html","tag-html-center-tag","tag-text-aligncenter-html"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Align Text in HTML ? - How to align text in CSS - HTML<\/title>\n<meta name=\"description\" content=\"How to Align Text in HTML ? - By using markup language, HTML is used to design webpages.\" \/>\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.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Align Text in HTML ? - How to align text in CSS - HTML\" \/>\n<meta property=\"og:description\" content=\"How to Align Text in HTML ? - By using markup language, HTML is used to design webpages.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-26T12:01:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-29T13:36:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png\" \/>\n<meta name=\"author\" content=\"webmaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webmaster\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/\",\"name\":\"How to Align Text in HTML ? - How to align text in CSS - HTML\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png\",\"datePublished\":\"2022-10-26T12:01:25+00:00\",\"dateModified\":\"2024-02-29T13:36:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\"},\"description\":\"How to Align Text in HTML ? - By using markup language, HTML is used to design webpages.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/#primaryimage\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png\",\"contentUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png\",\"width\":1287,\"height\":540},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\",\"name\":\"webmaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"caption\":\"webmaster\"},\"sameAs\":[\"https:\/\/www.wikitechy.com\/interview-questions\"],\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Align Text in HTML ? - How to align text in CSS - HTML","description":"How to Align Text in HTML ? - By using markup language, HTML is used to design webpages.","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.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/","og_locale":"en_US","og_type":"article","og_title":"How to Align Text in HTML ? - How to align text in CSS - HTML","og_description":"How to Align Text in HTML ? - By using markup language, HTML is used to design webpages.","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/","og_site_name":"Wikitechy","article_published_time":"2022-10-26T12:01:25+00:00","article_modified_time":"2024-02-29T13:36:10+00:00","og_image":[{"url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png"}],"author":"webmaster","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webmaster","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/","name":"How to Align Text in HTML ? - How to align text in CSS - HTML","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png","datePublished":"2022-10-26T12:01:25+00:00","dateModified":"2024-02-29T13:36:10+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"description":"How to Align Text in HTML ? - By using markup language, HTML is used to design webpages.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/html\/how-to-align-text-in-html\/#primaryimage","url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png","contentUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/html-align-left.png","width":1287,"height":540},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4","name":"webmaster","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","caption":"webmaster"},"sameAs":["https:\/\/www.wikitechy.com\/interview-questions"],"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/5056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=5056"}],"version-history":[{"count":2,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/5056\/revisions"}],"predecessor-version":[{"id":12188,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/5056\/revisions\/12188"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=5056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=5056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=5056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}