Jumat, 19 Oktober 2007

Blogger’s guide to HTML

Knowledge of some basic html coding is a very useful tool for bloggers. Web design programs are fine if you like to use them, but may prove somewhat tricky when trying to adapt code to paste into a layout or post. With a bit of html, you can easily transform your blog into something unique, interesting, and even easier to use. So here’s a quick guide to HTML code and links to useful sites where you can find out more:

Formatting:

Most blog clients have a formatting feature built in to the post editor. But if you want to
align text in the navbar for instance, you will have to do this yourself.

To create a paragraph (with spaces automatically inserted between paragraphs), you would
insert the following code:

< p > Your paragraph of text here < /p >

By default, text is aligned within a paragraph to the left. The code for this is as follows:

< p align=”left” > Your paragraph of text here < /p >

To align text to the right hand side of the page, you would add code like this:

< p align=”right” > Your paragraph of text here < /p >

And to centralise:

< p align=”center” > Your paragraph of text here < /p >

You can also use this simpler code to centralise text, images, tables, etc:

< center > Text/image/table/etc here < /center >

To insert a line break (no paragraph space), use this:

< /br >

Line breaks can be useful if you don’t want text to be beneath an image instead of following
on at the side.

Horizontal rules can also be useful in design. You can insert a simple horizontal rule across the available space in the page like this:

< /hr >

Which looks like this:

To make the horizontal rule span only half of the page, try this instead:

< hr width=”50%” >

You could align it to the centre of the page:

< center > < hr width=”50%” > < /center >

And you can even change the colour and thickness!

< hr width=”50%” color=”ff0000″ size=”10″ >

HTML code for a page link:

Basic links are simple, and usually appear as a feature in blogging platforms. However, there are some interesting features you can use with links, such as linking to different areas of the same page (or different areas of another page entirely!).

The basic html code for a page link is as follows:

< a href=”pagename.html” > Your link text here < a >

You can change the link text to anything you want, such as My Link, or LOOK HERE!.

Let’s suppose you want to link to a different part of the page. Here is where “anchors” come in handy…

You can create an anchor to the top of a page as follows:

At the top of your page, insert this code: < a name=”#top” >

Then wherever you want to provide a link to the top of your page, use something like this:

< a href=”#top” > Back to top < /a >

Save your work and try the link out: you should be taken to the top of the page. You can change these values to link to different areas of a page (as you may have already noticed in this post). Be careful to always insert the “#” symbol and to end the link with < /a >
otherwise you may find the whole page is linked!

If you want to link to another page which includes anchor links as part of the make-up, use something like this:

< a href=”yoursite.htm#top” which will link to the top of the page called “yoursite.htm”

You can input links to email addresses in order for readers to send you an email directly from your blog or site. Rather than using the “http” address, you would use “mailto:your@address.com” like this:

< a href=”mailto:your@address.com > Your email link < /a >

Changing font styles:

You can change the style and color of the font appearing on your blog. To make text bold or italic, use the following codes:

< b > Bold Text < /b >
< I > Italic Text < /i >

To change the color of text, use the following code:

< font color=”red” > Red Text < /font >

You can change “red” to any other colour, such as purple, yellow, blue, green.
Alternatively, you can use hex colours as I will describe below.

Colours:

You can use almost any colour in the spectrum to make your fonts, backgrounds, tables etc.
more colourful. To do this, you will need to enter the hex code for the colour and implement as follows:

< font color=”ffcc00″ > Your font colour < /font >

This inserts golden yellow text, but you can use any colour you wish. Hex colours are comprised of six digits which include the numbers 0-9 and A-F. Black, for example is “000000″ and white would be “ffffff” For a complete list of web colour codes, try Cedges Colour Code applet, which is great for previewing colours too!

0 komentar:

Posting Komentar

give your comment here, please do not spam

 
My Big Dream powered by XXZ