Com centrar el text (horitzontalment i verticalment) dins d'un bloc div en CSS?

Com centrar el text (horitzontalment i verticalment) dins d'un bloc div en CSS?

Centrant el text tant horitzontalment com verticalment dins d'un bloc div és important per crear dissenys visualment atractius. Diversos mètodes, com ara flexbox, grid i transformacions CSS, ofereixen solucions amb diferents avantatges i inconvenients. Aquest article examina aquests enfocaments comuns per aconseguir centrar el text dins dels blocs div.

Taula de contingut

Ús de Flexbox:

  • Estableix el contenidor principal a pantalla: flex; Això permet l'ús d'a flexbox i converteix el contenidor principal en un contenidor flexible.
  • Ús justificar-contingut: centre per centrar l'element secundari horitzontalment dins del contenidor principal.
  • Ús elements d'alineació: centre per centrar l'element secundari verticalment dins del contenidor principal.

Exemple: Aquest exemple mostra com centrar el text dins d'un div mitjançant la propietat flexbox de CSS .



HTML
      Centreu el text horitzontalment i verticalment dins d'un títol de bloc div> <style>body { text-align: center;  } .contenidor { alçada: 300px;  amplada: 645 píxels;  pantalla: flex;  justificar-contingut: centre;  alinear elements: centre;  vora: 2px negre sòlid;  } h1 { color: verd;  } estil> cap> <body>  <div>  <h1>GeekforGeeksh1> div> body> html>> </pre>  </code>  <p dir='ltr'>  <b>  <strong>Sortida: </strong>  </b>  </p>  <img src='//techcodeview.com/img/css-questions/74/how-center-text-horizontally.webp' alt=''> <h2 id='using-grid'> <span>Ús de Grid </span> </h2> <ul> <li value='1'>  <span>quadrícula CSS </span>  <span>és una altra eina de disseny popular que us permet crear dissenys complexos i flexibles basats en quadrícula. </span> </li> <li value='2'> <span>Estableix el contenidor principal a </span>   <b>  <strong>pantalla: quadrícula </strong>  </b>   <span>. Això permet l'ús d'una quadrícula CSS i converteix el contenidor principal en un contenidor de quadrícula. </span> </li> <li value='3'> <span>Utilitzar el </span>  <b>  <strong>  </strong>  </b>   <b>  <strong>llocs-elements: centre </strong>  </b>   <span>propietat per centrar l'element secundari tant horitzontalment com verticalment dins de la cel·la de la quadrícula. Aquesta propietat és una abreviatura per a tots dos </span>  <b>  <strong>justificar-elements </strong>  </b>  <span>i </span>  <b>  <strong>alinear elements </strong>  </b>  <span>. </span> </li> </ul> <p dir='ltr'>  <b>  <strong>Exemple: </strong>  </b>  <span>Aquest exemple mostra com centrar el text dins d'un div mitjançant la propietat grid de CSS. </span> </p>HTML <code>  <pre>  <html lang='en'>  <head>  <title>Centreu el text horitzontalment i verticalment dins d'un títol de bloc div> <style>.contenidor { alçada: 300px;  amplada: 645 píxels;  visualització: quadrícula;  llocs-elements: centre;  vora: 2px negre sòlid;  } h1 { color: verd;  } estil> cap> <body>  <div>  <h1>GeekforGeeksh1> div> body> html>> </pre>  </code>  <p dir='ltr'>  <b>  <strong>Sortida: </strong>  </b>  </p>  <img src='//techcodeview.com/img/css-questions/74/how-center-text-horizontally.webp' alt=''> <h2 id='using-text-align'>  <b>  <strong>Ús de l'alineació de text: </strong>  </b>  </h2> <ul> <li value='1'> <span>El </span>  <span>alineació de text </span>  <span>La propietat és una manera senzilla i senzilla de centrar el text horitzontalment dins d'un bloc div. </span> </li> <li value='2'> <span>Estableix el contenidor principal a </span>  <b>  <strong>text-align: centre. </strong>  </b>  <span>Això centra l'element fill horitzontalment dins del contenidor principal. </span> </li> <li value='3'> <span>Ús </span>  <b>  <strong>alçada de línia: </strong>  </b>  <span>per centrar l'element secundari verticalment dins del contenidor principal. El valor de ha de ser igual a l'alçada del contenidor principal. </span> </li> </ul> <p dir='ltr'>  <b>  <strong>Exemple: </strong>  </b>  <span>Aquest exemple mostra com centrar el text dins d'un div mitjançant l'alineació de text de CSS. </span> </p>HTML <code>  <pre>  <html lang='en'>  <head>  <title>Centreu el text horitzontalment i verticalment dins d'un títol de bloc div> <style>.contenidor { alçada: 300px;  amplada: 645 píxels;  alineació de text: centre;  alçada de línia: 400px;  vora: 2px negre sòlid;  } h1 { color: verd;  } estil> cap> <body>  <div>  <h1>GeekforGeeksh1> div> body> html>> </pre>  </code>  <p dir='ltr'>  <b>  <strong>Sortida: </strong>  </b>  </p>  <img src='//techcodeview.com/img/css-questions/74/how-center-text-horizontally.webp' alt=''> <h2 id='using-table-cell'> <span>Ús de la cel·la de la taula </span> </h2> <ul> <li value='1'> <span>Estableix el contenidor principal a </span>  <b>  <strong>pantalla: taula. </strong>  </b>  <span>Això emula el comportament d'una taula. </span> </li> <li value='2'> <span>Estableix l'element fill a </span>  <b>  <strong>pantalla: cel·la-taula </strong>  </b>  <span>. Això emula el comportament d'una cel·la de taula. </span> </li> <li value='3'> <span>Ús </span>  <b>  <strong>alineació vertical: mig </strong>  </b>  <span>per centrar l'element secundari verticalment dins del contenidor principal. </span> </li> <li value='4'> <span>Ús </span>  <b>  <strong>text-align: centre </strong>  </b>  <span>per centrar l'element secundari horitzontalment dins del contenidor principal. </span> </li> </ul> <p dir='ltr'>  <b>  <strong>Exemple: </strong>  </b>  <span>Aquest exemple mostra com centrar el text dins d'un div mitjançant la cel·la de la taula de text de CSS. </span> </p>HTML <code>  <pre>  <html lang='en'>  <head>  <title>Centreu el text horitzontalment i verticalment dins d'un títol de bloc div> <style>.contenidor { alçada: 300px;  amplada: 645 píxels;  visualització: cel·la-taula;  alineació de text: centre;  vertical-align: mig;  vora: 2px negre sòlid;  } h1 { color: verd;  } estil> cap> <body>  <div>  <h1>GeekforGeeksh1> div> body> html>> </pre>  </code>  <p dir='ltr'>  <b>  <strong>Sortida: </strong>  </b>  </p>  <img src='//techcodeview.com/img/css-questions/74/how-center-text-horizontally.webp' alt=''> <h2 id='using-transform-property'> <span>Utilitzant la propietat de transformació: </span> </h2> <ul> <li value='1'> <span>Estableix el contenidor principal a </span>  <b>  <strong>posició: relativa. </strong>  </b>  <span>Això permet l'ús del posicionament absolut per a l'element fill. </span> </li> <li value='2'> <span>Estableix l'element fill a </span>  <b>  <strong>posició: absoluta. </strong>  </b>  <span>Això permet l'ús del posicionament absolut per a l'element fill. </span> </li> <li value='3'> <span>Estableix l'element fill </span>  <b>  <strong>superior </strong>  </b>  <span>i </span>  <b>  <strong>esquerra </strong>  </b>  <span>propietats a </span>  <b>  <strong>50% </strong>  </b>  <span>. Això situa l'element fill al centre del contenidor principal. </span> </li> <li value='4'> <span>Ús </span>  <b>  <strong>transformar: traduir (-50%, -50%) </strong>  </b>  <span>per centrar l'element fill tant horitzontalment com verticalment. </span> </li> </ul> <p dir='ltr'>  <b>  <strong>Exemple: </strong>  </b>  <span>Aquest exemple mostra com centrar el text dins d'un div utilitzant la propietat de transformació de CSS. </span> </p>HTML <code>  <pre>  <html lang='en'>  <head>  <title>Centreu el text horitzontalment i verticalment dins d'un títol de bloc div> <style>.contenidor { alçada: 300px;  amplada: 645 píxels;  posició: relatiu;  vora: 2px negre sòlid;  } h1 { posició: absoluta;  superior: 50%;  color: verd;  esquerra: 50%;  transformar: traduir(-50%, -50%);  } estil> cap> <body>  <div>  <h1>GeekforGeeksh1> div> body> html>> </pre>  </code>  <p dir='ltr'>  <b>  <strong>Sortida: </strong>  </b>  </p>  <img src='//techcodeview.com/img/css-questions/74/how-center-text-horizontally.webp' alt=''> <p dir='ltr'> <span>En resum, l'enfocament escollit dependrà del cas d'ús específic, la compatibilitat amb altres elements i l'estètica de disseny desitjada. Amb aquests mètodes, és possible aconseguir un bloc de text centrat en una varietat de dissenys i dissenys. </span> </p>  <br>  <br>
                     </div>

                     <!-- Article Footer with Prominent Share Buttons -->
                     <div class="px-6 md:px-8 py-8 bg-slate-50 dark:bg-slate-900/50 border-t border-slate-200 dark:border-slate-700/50">
                          <div class="flex flex-col sm:flex-row items-center justify-between gap-6">
                              <h4 class="text-base font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wide flex items-center gap-2">
                                 <i class="fa fa-share-alt text-tech-500"> </i>
                                Comparteix                              </h4>
                             
                              <div class="flex flex-wrap justify-center gap-3">
                                 <!-- Twitter -->
                                 <a href="https://twitter.com/intent/tweet?text=Com centrar el text (horitzontalment i verticalment) dins d'un bloc div en CSS?&url=https://www.techcodeview.com/ca/how-center-text-horizontally" 
                                   target="_blank" rel="noopener noreferrer" 
                                   class="flex items-center gap-2 px-6 py-3 rounded-xl bg-[#1DA1F2]/10 text-[#1DA1F2] hover:bg-[#1DA1F2] hover:text-white transition-all duration-300 font-bold text-sm">
                                     <i class="fa fa-twitter text-lg"> </i>
                                     <span class="hidden sm:inline">Twitter </span>
                                 </a>

                                 <!-- Facebook -->
                                 <a href="https://www.facebook.com/sharer/sharer.php?u=https://www.techcodeview.com/ca/how-center-text-horizontally" 
                                   target="_blank" rel="noopener noreferrer"
                                   class="flex items-center gap-2 px-6 py-3 rounded-xl bg-[#4267B2]/10 text-[#4267B2] hover:bg-[#4267B2] hover:text-white transition-all duration-300 font-bold text-sm">
                                     <i class="fa fa-facebook text-lg"> </i>
                                     <span class="hidden sm:inline">Facebook </span>
                                 </a>
                                
                                 <!-- LinkedIn -->
                                 <a href="https://www.linkedin.com/shareArticle?mini=true&url=https://www.techcodeview.com/ca/how-center-text-horizontally&title=Com centrar el text (horitzontalment i verticalment) dins d'un bloc div en CSS?" 
                                   target="_blank" rel="noopener noreferrer"
                                   class="flex items-center gap-2 px-6 py-3 rounded-xl bg-[#0077b5]/10 text-[#0077b5] hover:bg-[#0077b5] hover:text-white transition-all duration-300 font-bold text-sm">
                                     <i class="fa fa-linkedin text-lg"> </i>
                                     <span class="hidden sm:inline">LinkedIn </span>
                                 </a>
                              </div>
                          </div>
                     </div>
                </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>

                <!-- Comments Placeholder / Random Articles -->
                <div class="mt-8 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-6 md:p-8 shadow-sm">
                     <h3 class="text-xl font-bold text-slate-900 dark:text-white mb-6 uppercase tracking-wide border-b border-slate-200 dark:border-slate-700 pb-2">
                        Potser T'Agradarà                     </h3>
                     <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                         <div class="group">
                              <a href="/ca/list-r-packages" class="block aspect-video rounded-lg overflow-hidden bg-slate-200 dark:bg-slate-700 mb-3">
                                 <img loading="lazy" src="https://techcodeview.com/img/r-tutorial/20/list-r-packages.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Llista de paquets R" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                              </a>
                              <h4 class="font-bold text-slate-900 dark:text-white leading-tight group-hover:text-tech-500 transition-colors">
                                 <a href="/ca/list-r-packages">Llista de paquets R </a>
                              </h4>
                         </div> <div class="group">
                              <a href="/ca/binary-number-system" class="block aspect-video rounded-lg overflow-hidden bg-slate-200 dark:bg-slate-700 mb-3">
                                 <img loading="lazy" src="https://techcodeview.com/img/math-concepts/97/binary-number-system.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Sistema de nombres binaris" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                              </a>
                              <h4 class="font-bold text-slate-900 dark:text-white leading-tight group-hover:text-tech-500 transition-colors">
                                 <a href="/ca/binary-number-system">Sistema de nombres binaris </a>
                              </h4>
                         </div>
                     </div>
                </div>
             </div>

             <!-- SECONDARY COLUMN (SIDEBAR) -->
             <!-- Aside Column -->
 <div class="lg:col-span-4 space-y-8">
	
	 <!-- Best Articles Widget -->
	 <div class="rounded-xl bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 p-6 shadow-sm">
		 <div class="mb-4 border-b border-slate-100 dark:border-slate-700 pb-2">
			 <h2 class="text-lg font-bold text-slate-900 dark:text-white uppercase tracking-wide flex items-center">
                 <span class="mr-2 h-2 w-2 rounded-full bg-tech-500"> </span>
                Articles Més Populars             </h2>
		 </div>
		
		 <!-- Owl Carousel Preserved Container -->
		 <div id="owl-carousel-3" class="owl-carousel owl-theme center-owl-nav">
			 <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/override-equals-method-java">
						 <img src="https://techcodeview.com/img/java-tutorial/41/override-equals-method-java.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Anul·lació del mètode igual a Java" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/override-equals-method-java" class="hover:text-tech-500 transition-colors line-clamp-3">Anul·lació del mètode igual a Java </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/best-college-essay-length-131348">
						 <img src="https://techcodeview.com/img/blog/36/best-college-essay-length.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="La millor durada de l'assaig universitari: quant de temps hauria de ser?" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/best-college-essay-length-131348" class="hover:text-tech-500 transition-colors line-clamp-3">La millor durada de l'assaig universitari: quant de temps hauria de ser? </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/java-convert-int-long">
						 <img src="https://techcodeview.com/img/java-conversion/51/java-convert-int-long.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Java Converteix int a long" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/java-convert-int-long" class="hover:text-tech-500 transition-colors line-clamp-3">Java Converteix int a long </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/best-character-analysis-131534">
						 <img src="https://techcodeview.com/img/blog/37/best-character-analysis.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Millor anàlisi de personatges: Nick Carraway – The Great Gatsby" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/best-character-analysis-131534" class="hover:text-tech-500 transition-colors line-clamp-3">Millor anàlisi de personatges: Nick Carraway – The Great Gatsby </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/dictionaries-python">
						 <img src="https://techcodeview.com/img/python-dict/02/dictionaries-python.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Diccionaris en Python" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/dictionaries-python" class="hover:text-tech-500 transition-colors line-clamp-3">Diccionaris en Python </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/how-change-link-color-css">
						 <img src="https://techcodeview.com/img/css-tutorial/54/how-change-link-color-css.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Com canviar el color de l'enllaç en CSS?" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/how-change-link-color-css" class="hover:text-tech-500 transition-colors line-clamp-3">Com canviar el color de l'enllaç en CSS? </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/handshaking-theory-discrete-mathematics">
						 <img src="https://techcodeview.com/img/discrete-mathematics/13/handshaking-theory-discrete-mathematics.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Teoria de l'encaixada de mans en matemàtiques discretes" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/handshaking-theory-discrete-mathematics" class="hover:text-tech-500 transition-colors line-clamp-3">Teoria de l'encaixada de mans en matemàtiques discretes </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/what-is-my-computer">
						 <img src="https://techcodeview.com/img/computer/36/what-is-my-computer.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Què és el meu ordinador?" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/what-is-my-computer" class="hover:text-tech-500 transition-colors line-clamp-3">Què és el meu ordinador? </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/python-program-breadth-first-search">
						 <img src="https://techcodeview.com/img/it-problems-solutions/67/python-program-breadth-first-search.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Programa Python per a Breadth First Search o BFS per a un gràfic" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/python-program-breadth-first-search" class="hover:text-tech-500 transition-colors line-clamp-3">Programa Python per a Breadth First Search o BFS per a un gràfic </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/ca/linux-exit-command">
						 <img src="https://techcodeview.com/img/linux-tutorial/33/linux-exit-command.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Ordre de sortida de Linux" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/ca/linux-exit-command" class="hover:text-tech-500 transition-colors line-clamp-3">Ordre de sortida de Linux </a>
                     </h4>
				 </div>
			 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
			 <!-- /ARTICLE -->
		 </div>
		

         <!-- Categories -->
		 <div class="mt-8 mb-4 border-b border-slate-100 dark:border-slate-700 pb-2">
			 <h2 class="text-lg font-bold text-slate-900 dark:text-white uppercase tracking-wide">Categoria </h2>
		 </div>
		 <div class="flex flex-wrap gap-2">
             <a href="/ca/blog/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Bloc
             </a> <a href="/ca/java-conversion/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Conversió De Java
             </a> <a href="/ca/maths/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Matemàtiques
             </a> <a href="/ca/java-collections/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Col·leccions Java
             </a> <a href="/ca/differences/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Diferències
             </a> <a href="/ca/java-string/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Cadena De Java
             </a>
         </div>

         <!-- Interesting Articles Widget -->
		 <div class="mt-8">
			 <div class="mb-4 border-b border-slate-100 dark:border-slate-700 pb-2">
				 <h2 class="text-lg font-bold text-slate-900 dark:text-white uppercase tracking-wide">Articles D'Interès </h2>
			 </div>
			
			 <div id="owl-carousel-4" class="owl-carousel owl-theme">
				 <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/ai-ml-ds-with-python/38/residual-networks-deep-learning.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Xarxes residuals (ResNet) – Aprenentatge profund" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/ca/ai-ml-ds-with-python/">Ai-Ml-Ds Amb Python </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/ca/residual-networks-deep-learning">Xarxes residuals (ResNet) – Aprenentatge profund </a> </h4>
					 </div>
				 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/it-problems-solutions/90/arrow-symbols-latex.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Símbols de fletxa en LaTeX" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/ca/it-problems-solutions/">Problemes Informàtics I Solucions </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/ca/arrow-symbols-latex">Símbols de fletxa en LaTeX </a> </h4>
					 </div>
				 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/category/82/what-is-full-form-tc.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Quina és la forma completa de TC" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/ca/category/">Categoria </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/ca/what-is-full-form-tc">Quina és la forma completa de TC </a> </h4>
					 </div>
				 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/geeks-premier-league-2023/01/how-go-full-screen-windows-11.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Com anar a pantalla completa a Windows 11?" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/ca/geeks-premier-league-2023-cat/">Geeks Premier League 2023 </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/ca/how-go-full-screen-windows-11">Com anar a pantalla completa a Windows 11? </a> </h4>
					 </div>
				 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/coding-problems/50/convert-integer-roman-numerals-java.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Converteix nombres enters en números romans a Java" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/ca/coding-problems/">Problemes De Codificació </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/ca/convert-integer-roman-numerals-java">Converteix nombres enters en números romans a Java </a> </h4>
					 </div>
				 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/blog/90/massive-collection-free-sat-practice-tests.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Una col·lecció massiva de proves pràctiques SAT gratuïtes" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/ca/blog/">Bloc </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/ca/massive-collection-free-sat-practice-tests-131386">Una col·lecció massiva de proves pràctiques SAT gratuïtes </a> </h4>
					 </div>
				 </article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
				 <!-- /ARTICLE -->
			 </div>
		 </div>
	 </div>
 </div>
 <!-- /Aside Column -->         </div>
        </div>
     </div>

 <footer class="site-footer">
         <div class="container">
             <span class="footer-links">
                Copyright ©2026 Tots Els Drets Reservats | 
                 <a href="//www.techcodeview.com/ar/">techcodeview.com </a> | 
                 <a href="/disclaimer" rel="nofollow noopener noreferrer" target="_blank">Exempció De Responsabilitat </a> | 
                 <a href="/about-us" rel="nofollow noopener noreferrer" target="_blank">Sobre Nosaltres </a> | 
                 <a href="/privacy-policy" rel="nofollow noopener noreferrer" target="_blank">Política De Privadesa </a> 
             </span>
         </div>
     </footer>
 
     <script type="text/javascript" src="https://techcodeview.com/template/assets/plugins/jquery-1.11.3.min.js"> </script>
     <script type="text/javascript" src="https://techcodeview.com/template/assets/plugins/bootstrap/js/bootstrap.min.js"> </script>    
     <script type="text/javascript" src="https://techcodeview.com/template/assets/js/main.js"> </script>     
	 <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"> </script>
	 <script>
    !function(){"use strict";let t=document.createElement("button");t.id="toTopBtn",t.innerHTML="↑";let e=`
        #toTopBtn {
            position: fixed; bottom: 25px; right: 25px; z-index: 9999; opacity: 0; visibility: hidden; background-color: #0ea5e9; color: white; border: none; border-radius: 8px; width: 50px; height: 50px; font-size: 24px; cursor: pointer; transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        }
        #toTopBtn:hover { background-color: #0284c7; }
    `,i=document.createElement("style");i.type="text/css",i.innerText=e,document.head.appendChild(i),document.body.appendChild(t),window.addEventListener("scroll",()=>{let e=window.scrollY||document.documentElement.scrollTop;e>300?(t.style.opacity="1",t.style.visibility="visible"):(t.style.opacity="0",t.style.visibility="hidden")}),t.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})})}();
     </script>
 </body>
 </html>