Subscribe For Free Updates!

We'll not spam mate! We promise.

Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Jul 14, 2013

Remove MS Word special character symbol in html

Remove MS Word special character symbol in html :

 To remove the MS Word special character in html page or website page you just add the bellow header meta tag in your header field.

<META http-equiv="Content-type" content="text/html; charset=iso-8859-1">

Note: In some case the above meta tag will work individually, ie.,) No need to add any other meta tag with this.

Remove MS Word special character symbol in html

Jul 11, 2013

PHP Remove HTML tags from a String

PHP Remove HTML tags from a String :

PHP Remove HTML tags from a String

 The following code is used to remove the html tags from string.

<?php

$input="Hi this is <b>TechniqZone</b>";
$text = strip_tags($input, "");
echo $text;
?>

Output is Hi this is TechniqZone.

The above code remove all html tags from string.


Here strip_tags() function is used to remove tags from string.

string strip_tags ( string $str [, string $allowable_tags ] )


$allowable_tags - You can use the optional second parameter to specify tags which should not be stripped.



<?php

$input="Hi this is lt;a href='http://techniqzone.blogspot.in'><b>TechniqZone</b>lt;/a>";
$text = strip_tags($input, "<b>");
echo $text;
?>


Output is Hi this is TechniqZone. 

Here i allowed <b> tag from string.




Feb 10, 2013

Add Favicon Image to HTML


Add Favicon Image to HTML site


Favicon is an image (icons/png) associated with a Web page/Web site. This favicon image is shown in the address bar or in tabs.. This is for website identity.

The following code should be in style tag.

<link rel="icon" type="image/png" href="http://techniqzone.blogspot.in/favicon.png">

if the favicon image is .ico format, then follow the below code.
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
Once you have created a favicon.ico file, you simply upload it to the root directory and add these two lines of coding to your webpage, making sure they go into the <head> section of your coding.