Pages

Ads 468x60px

Wednesday, October 30, 2013

custom fonts with css (@face-fonts command)




Want to embed your own fonts in your site to give it style or auto-load custom fonts for some exotic language?You can do that using css with the @font-face command.

In your <b:skin><b:/skin> section add the following code.


<!--custom fonts-->
<style>
@font-face
{font-family: segoe script;
src:url('http://dl.dropboxusercontent.com/s/8sao0jcc1o6fjso/ufonts.com_segoe_script.ttf');}

p.segoe {
font-family:segoe script;
}
</style>
<!--end of custom fonts-->


Replace segoe script with the name of your font and the url in purple with your url with the custom font.Dropbox is a very good place to upload your custom font.Other hosts may give you hard time with the custom font not displaying correctly.
  
Next add this code whereever you want the text to appear in your custom font.

<p class='segoe'>your text here</p>

Now ,whenever you open a <p class='segoe'></p> tag in your posts your custom font will load automatically within your tag.

Here is what my custom font looks like:

Segoe script custom fonts!


Taking it further
The same goes for all other tags like h1,h2,b  and so on.Instead of p.segoe you can define a b.segoe or a h1.segoe and call it with class='segoe'>

You can even create your tags.For example in this page of mine,I wanted to preload fonts for the coptic language so that the visitor does not have to install them on his/her computer.

So I came up with the <cpt> </cpt>.You can use any name you like for tag ,just make sure it does not exist already in html or the language you are coding in.

Then the code will look like this

<style>
@font-face
{font-family: name of your font;
src: url(http://mycopticfonturl.ttf);}

cpt {
font-family:name of my coptic font, Helvetica, Arial, sans-serif;
}
</style>

Now whenever I want to auto-load coptic text in my post I just put it between my new made cpt tags

<cpt>your text</cpt>


Read more ...

Monday, October 14, 2013

the simplest html document

Hello,today I will show how a basic html document should appear.First we got the document type (doctype) then the <html> tag followed by the <body> tag.At the end you need to close these tags using the / symbol.

<!DOCTYPE html>

<html>
<body>

<h1>heading</h1>
<h2> secondary heading</h2>
<p>paragraph.</p>

</body>
</html>
Read more ...

How to color your table cells.

If you are making an html table you might want to use different colours for individual cells.
 
Cell 1Cell 2
Cell 3Cell 4

So,you may want to paint one of your cells green.Like this.

Cell 1 Cell 2
Cell 3 Cell 4

That's easy to do using html.All you have to do is to insert the bgcolor attribute within the <td> tag,like this:

<td bgcolor='green'>

Read also
how to make a table using html.
Read more ...

Wednesday, October 9, 2013

How to create a simple hyperlink.

You might wander how to create a simple link to another document or a link to a position in the same page.This is called a hyperlink.The link can be text or image.

Here is the code for a simple text link.
<a href="url">Link text</a>

You can make a link to a position in the same document by using id.
<a id="top">top</a>
<a href="#top">go back on top</a>


And here is the code for an image link.
<a href="your url">
<img src="yourimage.gif" width="32" height="32"></a>

Read more ...

Monday, October 7, 2013

Creating simple headings with html

We continue with our short lessons of learning html with the headings tag.

You can easily create headings using the 'h' tag.You can use <h1> to <h6>.<h1>  is the biggest of them in size while <6> is the smallest.

Here is the code:

<h1>Hello</h1>
<h2>Hello 2</h2>
<h3>Hello 3</h3>
<h4>Hello 4</h4>
<h5>Hello 5</h5>
<h6>Hello 6</h6>

And this is the result using this code.


Read more ...

Saturday, October 5, 2013

Why learn html?

You might wonder why should you learn html coding.Because it can be very handy ,especially if you 're into making your own site,blogging etc.

Knowing some html will allow you to tweek your blog and correct some stuff that otherwise might be very annoying to you or your visitor.

For example you got a counter for your site that appears always on the left of the page looking completely out of place.You have no idea what to do to correct this and you do not to hire someone for such a simple task.Html is the answer.It will

Another important reason to learn Html is that it is rather easy to learn this clanguage in comparison with others.

To programm in html no editor is needed.A simple text editor will do.In many platforms such as blogger the text editor is not needed ,too.It comes with blogger.
Read more ...

How to make a table using html

Tables can be very useful in your site.For example you want to put to ads one next to each other.That can be easily done with the
tag.

<table>
<tbody>
<tr><td>1</td><td>2</td></tr>
<tr><td>2</td><td>3</td></tr>
</tbody>
</body>

The <td> s are lines and the<td>s are positioned within the same line. So if you want to put two ads next to each other just put the code of the first ad between <td>1</td> replacing the 1 with your code.For the second ad do the same replacing 2 with your code.

You can increase the number of the lines by adding <td></td> and the number of cells in each line using more <td></td> tags.
Read more ...

How to align text/image/table or anything else on your page.

Hello,today we will learn html,nothing completicated ,just a simple way to align anything on your page left,right or in the center. To do that you will need a div tag and the command align.Let's take a look.

<div align='center'> Your text/image to be aligned here. </div>
Aligning a table can be a little tricky.You should not use a div tag in this case but you should put the align command within the tag
<table align='left'> .... Your table here .... </table>
You can put left or right in place of center. And that's about it.
Read more ...
 

Sample text

Sample Text