Programming

How to change bullet style for unordered list UL in HTML or CSS

The unordered list “<ul>” supports an attribute named “type” that specifies type of display for bullets. The “type” attribute takes values: disc,circle,square.

The following displays a square instead of default disc style for bullets.

<ul type="square">
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>

display looks like following

  • One
  • Two
  • Three

Similarly, a disc style appears as follows:

  • One
  • Two
  • Three

Similarly, a circle style appears as follows:

  • One
  • Two
  • Three

Otherwise, you can use “list-style-type” attribute in CSS as shown below:

ul {
  list-style-type: square;
}

You can customize the bullets further by specifying an image url in CSS as follows:

ul {
  list-style-type: url("/images/arrow.jpg");
}

More >

How to display special characters in HTML

HTML is a mark up language that uses characters like “<”, “>” as part of its syntax. So it provides a special escapes to display the special characters as is in HTML. The following table provides list of special characters and their HTML syntax.



Name Symbol HTML syntax Ampersand & &amp; Cent ¢ &cent; Copyright © &copy; Degree ° &deg; Greater Than > &gt; Less Than < &lt; Non-breaking Space &nbsp; Registered Trademark ® &#174 Trademark ™ ™

How to disable left indentation of LI tags in HTML

The <li> tag can be used under an unordered list tag <ul> or ordered list tag <ol>.

The following shows how <li> tag can be used in an unordered list. Under unordered list, each <li> shows a bullet by default.

<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>

The above code appears in the browser as follows:

  • One
  • Two
  • Three

You can use following CSS to disable left indentation:

ul {margin: 0;}

If you don’t want to display bullets, you can do the following.

ul {
 list-style-type: none;
 margin: 0;
}

You can use similar trick for ordered list

    as well.

More >

How to disable display of bullets for LI tags in HTML

The <li> tag can be used under an unordered list tag <ul> or ordered list tag <ol>.

Unordered List The following shows how <li> tag can be used in an unordered list. Under unordered list, each <li> shows a bullet by default.

<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>

The above code appears in the browser as follows:

  • One
  • Two
  • Three

If you don’t want each <li> item not to display its position as number  under <ul>, you can add “list-style-type: none;” style to the <ul> tag.

<ul style="list-style-type: none;">
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>

Ordered List The following shows how <li> tag can be used in an ordered list. Under ordered list, each More >

How to disable HTTPS or SSL in Apache server

If your web server is not hosted using a dedicated IP address and doesn’t have a security certificate, it is implicit that you can’t host HTTPS service. In such cases, it is always better to disable HTTPS service so that there won’t be any unwanted service running in the server.

Use the following command to find if Apache is listening on HTTPS port.

[root@techpulp ~]# netstat -ntl | grep 43
tcp        0      0 :::443                      :::*                        LISTEN
[root@techpulp ~]#

To disable Apache from enabling HTTPS service, you need to comment the following line in /etc/httpd/conf.d/ssl.conf file.

#Listen 443

You need to restart the service to make the More >