
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CSS &#8211; CodeInDotNet</title>
	<atom:link href="https://www.codeindotnet.com/category/html/css/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codeindotnet.com</link>
	<description>C# Dot Net Programming tutorial &#38; code examples</description>
	<lastBuildDate>Tue, 02 Apr 2024 06:45:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://www.codeindotnet.com/wp-content/uploads/2021/04/SiteIcon.png</url>
	<title>CSS &#8211; CodeInDotNet</title>
	<link>https://www.codeindotnet.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Remove underline from Hyperlink link &#8211; HTML, CSS</title>
		<link>https://www.codeindotnet.com/remove-underline-from-link-html-css/</link>
					<comments>https://www.codeindotnet.com/remove-underline-from-link-html-css/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 28 Nov 2023 05:05:21 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<guid isPermaLink="false">https://www.codeindotnet.com/?p=6426</guid>

					<description><![CDATA[Hyperlinks allow users to navigate between different pages and websites, seamlessly. A hyperlink usually puts an underline to the text by default. You might want to remove the underline from the hyperlinked text as part of your web design. Remove Underline from Links &#8211; Different Ways Let&#8217;s explore different techniques to remove underlines from hyperlinks; [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div id="PageInHoriAd1"></div>
<script>
fetch('https://www.codeindotnet.com/gads/PageInHoriAd1.txt')
	.then(response => response.text())
	.then(text => {
		document.getElementById('PageInHoriAd1').innerHTML = text;
	})
	.catch(error => {
		console.error('Error fetching manual PageInHoriAd1:', error);
	});
</script>



<p>Hyperlinks allow users to navigate between different pages and websites, seamlessly. A hyperlink usually puts an underline to the text by default. You might want to remove the underline from the hyperlinked text as part of your web design. </p>



<br>



<h2 class="wp-block-heading h2Cust1" id="remove-underline-from-links-different-ways"><strong>Remove Underline from Links &#8211; Different Ways</strong></h2>



<br>



<p>Let&#8217;s explore different techniques to remove underlines from hyperlinks;</p>



<br>



<h3 class="wp-block-heading hLBRed" id="1-css"><strong>1. CSS:</strong></h3>



<br>



<p>The most common and effective way to remove underlines from hyperlinks is by using CSS. Here&#8217;s a simple CSS snippet to remove underlines</p>



<br><div><b><i><u>code snippet:</u></i></b></div>



<pre class="pchl"><code>a {
  text-decoration: none;
}
</code></pre>



<br>



<p>This CSS code targets all <strong>anchor &lt;a&gt;</strong> elements and sets the <strong>text-decoration</strong> property to <strong>none</strong>, effectively removing the underline.</p>



<br><br><br>



<h3 class="wp-block-heading hLBRed" id="2-inline-style"><strong>2. Inline Style:</strong></h3>



<br>



<p>you can use inline styles directly within the HTML code.</p>



<br><div><b><i><u>code snippet:</u></i></b></div>



<pre class="pchl"><code>&lt;a style="text-decoration: none;" href="https://CodeInDotNet.com">Visit CodeInDotNet.com&lt;/a>
</code></pre>



<br>



<p>In this example, the <strong>style </strong>attribute is added directly to the <strong>&lt;a&gt;</strong> element, specifying &#8216;<strong>text-decoration: none;</strong>&#8216;.</p>



<br><br><br>



<h3 class="wp-block-heading hLBRed" id="3-pseudo-classes"><strong>3. Pseudo-Classes:</strong></h3>



<br>



<p>CSS pseudo-classes allow you to define styles for specific states of an element. For hyperlinks, the <strong>:hover</strong> pseudo-class is commonly used to define styles for when a user hovers over a link. To ensure the removal of underlines even on hover, you can use the following code:</p>



<br><div><b><i><u>code snippet:</u></i></b></div>



<pre class="pchl"><code>a, a:visited, a:hover, a:active {
  text-decoration: none;
}
</code></pre>



<br>



<p>This CSS rule targets various states of the hyperlink, ensuring that the underline is removed consistently.</p>



<br><br><div><b><i><u>screenshot:</u></i></b></div>



<figure class="wp-block-image size-full"><img decoding="async" width="302" height="163" src="https://www.codeindotnet.com/wp-content/uploads/2023/11/remove-underline-from-link-html-css.jpg" alt="remove underline from link html css" class="wp-image-6438" srcset="https://www.codeindotnet.com/wp-content/uploads/2023/11/remove-underline-from-link-html-css.jpg 302w, https://www.codeindotnet.com/wp-content/uploads/2023/11/remove-underline-from-link-html-css-300x163.jpg 300w" sizes="(max-width: 302px) 100vw, 302px" /></figure>



<div id="PageInAd1"></div>
<script>
fetch('https://www.codeindotnet.com/gads/PageInAd1.txt')
	.then(response => response.text())
	.then(text => {
		document.getElementById('PageInAd1').innerHTML = text;
	})
	.catch(error => {
		console.error('Error fetching manual PageInAd1:', error);
	});
</script>



<br>
<script src="/my-js/latesttop10post.js" type="text/javascript"></script>
<input type="hidden" id="cids" value="112,123,129,138,103,104">
<div id="latestPostlist"></div>
<br>



<div class="wp-block-rank-math-toc-block toc-cust" id="rank-math-toc"><h2>Table of Contents</h2><nav><ul><li><a href="#remove-underline-from-links-different-ways">Remove Underline from Links &#8211; Different Ways</a><ul><li><a href="#1-css">1. CSS:</a></li><li><a href="#2-inline-style">2. Inline Style:</a></li><li><a href="#3-pseudo-classes">3. Pseudo-Classes:</a></li></ul></li></ul></nav></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codeindotnet.com/remove-underline-from-link-html-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Insert tab spaces characters in text &#8211; HTML CSS</title>
		<link>https://www.codeindotnet.com/insert-tab-white-spaces-in-text-html-css-code/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 25 Mar 2023 22:35:04 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<guid isPermaLink="false">https://www.codeindotnet.com/?p=2991</guid>

					<description><![CDATA[White Spaces can be added in three ways: The most recommendable solutions are: Space Using HTML Syntax 4 ways to insert Space via HTML code: 1. Single Space (&#38;nbsp;) &#38;nbsp &#8211; This is a non-breaking space that generates single or regular spaces. This is also called fixed spaces that cannot be broken by word wrap.Use [&#8230;]]]></description>
										<content:encoded><![CDATA[
<br>



<div>White Spaces can be added in three ways:</div>



<ul class="wp-block-list">
<li><a href="#htmlsyntax"><strong>HTML Syntax</strong></a></li>



<li><a href="#tabsizeprop" data-type="internal" data-id="#tabsizeprop"><strong>&lt;pre&gt; element, tab-size property</strong></a></li>



<li><a href="#cssstyles"><strong>CSS Styles</strong></a></li>
</ul>



<div>The most <span style="background-color: #90ee90; padding: 0.0625rem 0.3125rem; border-radius:0.625rem">recommendable solutions</span> are: </div>



<ul class="wp-block-list">
<li><a href="#pretagapproach" data-type="internal" data-id="#pretagapproach"><strong>&lt;pre&gt; element tag</strong></a></li>



<li><a href="#cssstyles" data-type="internal" data-id="#cssstyles"><strong>margin or padding spaces</strong></a></li>
</ul>



<br>



<h2 id="htmlsyntax" style="
    font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;
    border-left: 0.375rem solid #ff0000;
    padding: 0.375rem;
    box-shadow: 0rem 0.125rem 0.625rem 0rem #cac9c9;
    margin-bottom: 1.25rem;
    border-radius: 0rem 0.625rem 0.625rem 0rem;
    font-weight: bold;">
Space Using HTML Syntax
</h2>



<p>4 ways to insert Space via HTML code:</p>



<h3 style="font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;"><strong>1. Single Space (&amp;nbsp;)</strong></h3>



<p style="margin-top:0.625rem"><span class="spanHT">&amp;nbsp</span> &#8211; This is a non-breaking space that generates single or regular spaces. This is also called fixed spaces that cannot be broken by word wrap.<br>Use single-space syntax <span class="spanHT">&amp;nbsp;</span> multiple times in the text to make space wider.<br>You can also write &amp;nbsp; as &amp;#160.</p>



<div style="margin-bottom: 0.4375rem;">
<b><i>HTML syntax:</i></b>
<span style="background-color: beige; padding: 0.125rem 0.3125rem;">
&lt;p&gt;This is single ‘&amp;ensp;’ space.&lt;/p&gt;
</span>
</div>
<div>
<b><i>Output:</i></b> This is a single <span class="spanHT">&#8216;&nbsp;&#8216;</span> space.
</div>



<br>



<h3 style="font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;"><strong>2. Double Space (&amp;ensp;)</strong></h3>



<p style="margin-top:0.625rem"><span class="spanHT">&amp;ensp;</span> &#8211; This is called &#8216;en&#8217; two spaces gap, and whitespace is normally twice the spaces of regular (single) space. It denotes half point size of the current font.</p>



<div style="margin-bottom: 0.4375rem;">
<b><i>HTML syntax:</i></b>
<span style="background-color: beige; padding: 0.125rem 0.3125rem;">
&lt;p&gt;This is double &#8216;&amp;ensp;&#8217; space.&lt;/p&gt;
</span>
</div>
<div>
<b><i>Output:</i></b> This is a double <span class="spanHT">&#8216; &#8217;</span> space.
</div>



<br>



<h3 style="font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;"><strong>3. Four (4x) space gap (&amp;emsp;)</strong></h3>



<p style="margin-top:0.625rem"><span class="spanHT">&amp;emsp;</span> &#8211; ’em’ four spaces gap, is equal to the point size of the current font and typically as much as four times wider than the common regular space.</p>



<div style="margin-bottom: 0.4375rem;">
<b><i>HTML syntax:</i></b>
<span style="background-color: beige; padding: 0.125rem 0.3125rem;">
&lt;p&gt;This is four 4x &#8216;&amp;emsp;&#8217; space.&lt;/p&gt;
</span>
</div>
<div>
<b><i>Output:</i></b> This is a four 4x <span class="spanHT">&#8216; &#8217;</span> space.
</div>



<br>



<h3 style="font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;"><strong>4. Narrow Space (&amp;thinsp;</strong>)</h3>



<p style="margin-top:0.938rem"><span class="spanHT">&amp;thinsp;</span> &#8211; this is called narrow space, which is usually more narrow than a regular space.</p>



<div style="margin-bottom: 0.4375rem;">
<b><i>HTML syntax:</i></b>
<span style="background-color: beige; padding: 0.125rem 0.3125rem;">
&lt;p&gt;This is narrow &#8216;&amp;thinsp;&#8217; space.&lt;/p&gt;
</span>
</div>
<div>
<b><i>Output:</i></b> This is a narrow <span class="spanHT">&#8216; &#8217;</span> space.
</div>



<br><br>



<h2 id="tabsizeprop" style="
    font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;
    border-left: 0.375rem solid #ff0000;
    padding: 0.375rem;
    box-shadow: 0rem 0.125rem 0.625rem 0rem #cac9c9;
    margin-bottom: 1.25rem;
    border-radius: 0rem 0.625rem 0.625rem 0rem;
    font-weight: bold;">
Space Using &lt;pre&gt; element or tab-size property
</h2>



<p>Apply either of one approach, use text in &lt;pre&gt; element or set the tab-size property for &lt;pre&gt; element tag to render space in the text.</p>



<h3 id="pretagapproach" style="font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;"><strong>1. &lt;pre&gt; tag Approach</strong></h3>



<p style="margin-top:0.938rem">Simply add tabs or multiple spaces in the inner text within &lt;pre&gt; element tag and that will be rendered in the same format. The &lt;pre&gt; element simply represents preformatted text.<br>WordPress provides a &#8216;code&#8217; block feature in its editing tool which uses the same &lt;pre&gt; element tag to render the pasted text like highlighting programming or script codes, and preserves the same format.<br>Highly <span style="background-color: #90ee90; padding: 0.0625rem 0.3125rem; border-radius:0.625rem">recommended</span> if you want to display multiple tabs, <b>spaces, and linebreaks</b> on the output page without breaking newlines &amp; whitespace characters.<br><br>
<b><i>HTML syntax:</i></b><br><span style="background-color: beige; padding: 0.125rem 0.3125rem;">
&lt;pre&gt; <br>&nbsp;&nbsp;your&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;text&nbsp; &nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;here.<br>&lt;/pre&gt;</span>
<br><br>
<b><i>Output:</i></b><br>
&nbsp;&nbsp;your&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;text&nbsp; &nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;here.
</p>



<br>



<h3 style="font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;"><strong>2. tab-size property Approach</strong></h3>



<p style="margin-top:0.938rem">The tab-size property is used to specifiy the tab&#8217;s width size in HTML code. You need to change the value of tab character through tab-size property by using style.<br><b>Note:</b> you can also use <b>&amp;#9;</b> to denote as tab space.<br><br>
<b><i>CSS style code:</i></b><br><span style="background-color: beige; padding: 0.125rem 0.3125rem;">&lt;style&gt; .TabSpace { tab-size: 4; } &lt;/style&gt;<br>&lt;pre&gt; sample text &lt;/pre&gt;<br>&lt;pre&gt; sample<b>&amp;#9;</b>text &lt;/pre&gt;</span>
</p>



<div>Both approaches are shown in below sample code.<br><br><b><i>HTML code:</i></b></div>



<pre class="pchl"><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;style&gt;
		#tab1 {
		  -moz-tab-size: 4;
		  <b>tab-size: 4;</b>
		}
		.tab2 {
		  -moz-tab-size: 12;
		  tab-size: 12;
		}
	&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
	&lt;h2&gt;pre tab-size property example&lt;/h2&gt;

&lt;pre&gt;<b>Approach 1:</b> without<span style="white-space:pre;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>tabsize <span style="white-space:pre;">&nbsp; &nbsp;&nbsp;</span>property
<span style="white-space:pre;">&nbsp; &nbsp;&nbsp;</span>displays <span style="white-space:pre;">&nbsp; &nbsp;&nbsp;</span>as <span style="white-space:pre;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>it is<span style="white-space:pre;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span>.<span style="white-space:pre;">&nbsp; &nbsp;&nbsp;</span>
&lt;/pre&gt;
	<span style="white-space:pre;">&nbsp; &nbsp;&nbsp;</span>&lt;pre id="tab1"&gt;<b>Approach 2</b> (tab-size:4):  This	is	pre	tabsize<b>&amp;#9;</b>example.&lt;/pre&gt;
	<span style="white-space:pre;">&nbsp; &nbsp;&nbsp;</span>&lt;pre class="tab2"&gt;<b>Approach 2</b> (tab-size:12):  pre	tab	size<b>&amp;#9;</b>sample.&lt;/pre&gt;

&lt;/body&gt;
&lt;/html&gt; </code></pre>



<div><b><i>Output:</i></b></div>



<figure class="wp-block-image size-large"><img decoding="async" src="https://www.codeindotnet.com/img/htmlcss/space-using-tab-size-property.jpg" alt="space-using-tab-size-property-html-css"/></figure>



<br><br><br>



<h2 id="cssstyles" style="
    font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;
    border-left: 0.375rem solid #ff0000;
    padding: 0.375rem;
    box-shadow: 0rem 0.125rem 0.625rem 0rem #cac9c9;
    margin-bottom: 1.25rem;
    border-radius: 0rem 0.625rem 0.625rem 0rem;
    font-weight: bold;">
Space Using CSS styles
</h2>



<p>Use margin or padding CSS style properties if white space is required before or after span, paragraph, div or any element tag. Best, <span style="background-color: #90ee90; padding: 0.0625rem 0.3125rem; border-radius:0.625rem">reliable and recommended</span> solution in such scenarios. </p>



<h3 style="font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;"><strong>1. Margin-left space</strong></h3>



<br>



<div style="margin-bottom: 0.4375rem;">
<b><i>HTML code:</i></b>
<span style="background-color: beige; padding: 0.125rem 0.3125rem;">
sample of &lt;span style=&#8221;margin-left:15px&#8221;&gt;left Margin space.&lt;/span&gt;
</span>
</div>
<div>
<b><i>Output:</i></b> sample of <span style="margin-left:0.9375rem">left Margin space.</span><br>
</div>



<br>



<h3 style="font-family: segoe ui,Work Sans,Open Sans,Helvetica,Arial,sans-serif !important;"><strong>2. Padding-left space</strong></h3>



<br>



<div style="margin-bottom: 0.4375rem;">
<b><i>HTML code:</i></b>
<span style="background-color: beige; padding: 0.125rem 0.3125rem;">
sample of &lt;span style=&#8221;padding-left:15px&#8221;&gt;left Padding space.&lt;/span&gt;
</span>
</div>
<div>
<b><i>Output:</i></b> sample of <span style="padding-left:0.9375rem">left Padding space.</span><br>
</div>



<br><br><br>



<div style="padding: 0.625rem 1.25rem 1.25rem 1.25rem; box-shadow: 0.0625rem 0.0625rem 0.9375rem 0rem lightgrey; margin-bottom: 1.25rem; border-radius: 0.625rem;">

<div><span style="border-bottom: 0.0625rem solid #cd5c5c; color:#cd5c5c;"><b><i>see also:</i></b></span></div>

	<div style="padding-left:0.9375rem;">

	<div style="padding-top:0.625rem; margin-bottom:0.1875rem;"><b>&#8211; <a href="https://www.codeindotnet.com/ascii-value-code-table-unicode/">ASCII codes, characters and values based on Windows-1250</a></b></div>
	<div style="margin-bottom:0.1875rem;"><b>&#8211; <a href="https://www.codeindotnet.com/export-dataset-to-excel-in-c-net-core-openxml/">Export DataSet To Excel in C# .Net Core – OpenXml</a></b></div>
	<div style="margin-bottom:0.1875rem;"><b>&#8211; <a href="https://www.codeindotnet.com/dynamically-add-anchor-tag-in-div-html-javascript/">Dynamically generate anchor tag in div HTML  javascript</a></b></div>
	<div style="margin-bottom:0.1875rem;"><b>&#8211; <a href="https://www.codeindotnet.com/alt-codes-windows-numeric-keypad-list/" aria-current="page">Ultimate Alt Codes (0-255)</a></b></div>

	</div>
</div>



<br>



<p><em>reference: <a href="https://en.wikipedia.org/wiki/Whitespace_character" data-type="URL" data-id="https://en.wikipedia.org/wiki/Whitespace_character" target="_blank" rel="noopener">wikipedia.org/wiki/Whitespace</a></em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
