Your Ad Here

Posts Tagged ‘webdesigning’

Connecting a style sheet with a HTML file

Connecting a style sheet with a HTML file:

Today I will tell you how to import a style sheet into a HTML file, it is very simple. There are a few ways of doing it. So let us being…

Method 1: Writing a style sheet within a HTML page

Well after the <title> in the <head>, we mention that we are giving a link to a style sheet and start coding there. This is what the html code will look like

<html>

<head>

<title>Untitled-1</title>

<link rel=”stylesheet” type=”text/css”>

<style type=”text/css”>

h1{

background:black;

color:white;

}

background:black;

/** and so on and so forth the styling can be continued**/

</style>

</head>

If your web has not a lot of styling involved then only I recommend, because if your webpage is totally based on a lot of styles, then it gets rather complicated or if the style is being imported to many pages.

Method 2: Linking to an external style sheet

In the head we can import an external style sheet. The advantage to this is that it can be applied to as many pages without having to put the whole CSS code into the HTML file.

<html>

<head>

<title>Untitled-1</title>

<link rel=”stylesheet” type=”text/css” href=”/style/style.css” media=”all”>

</head>

Well if you see href=”/style/style.css”, this is more like a hyperlink to the style sheet. Well indeed it is a hyperlink to the style sheet. Now an important piece of information, you should place the link in the href from the root to the web site. Most of the websites use this method, as it is better and easier to implement. And changes can be made much more easily as compared to method 1 of adding styles to your web page.

We can multilink that is connecting multiple style sheets; here is a specific pattern by which results comes. We can embed 2 or more style sheets by the following code

<html>

<head>

<title>Untitled-1</title>

<link rel=”stylesheet” type=”text/css” href=”/style/style.css” media=”all”>

<link rel=”stylesheet” type=”text/css” href=”/style/style_new.css” media=”all”>

</head>

Method 3: Importing a style sheet

This is a built in declaration that we can use to import a style sheet into a HTML page. The syntax is as follows

<html>

<head>

<title>Untitled-1</title>

@import url(styles/style.css);

</head>

Method 4: Inlining style sheets

We can put our styles individually to elements, this can be done as follows:

<p STYLE=”color:red; background: black; align: center”>This paragraph will be styled as red text on black background.</p>.

So this is about it. I hope you understood the basics of connecting a style sheet with an HTML file. In case of any questions feel free to contact. Have a great day .

Posted on June 12th, 2009 by Mutedart  |  1 Comment »

Website development a few tips



We often have to design website. What we should think? there are many books on how to make websites. Many tutorials for how to make websites and there are good ones.

I just thought of sharing a few tips:

  1. Never have too many links on the first page
  2. Some times it is better to have some clean space rather than trying to fill it up force fully
  3. Keep your color scheme aesthetic. But what is aesthetic? Keeping it simple, elegant and professional(often i call it sep)
  4. Never use funky fonts in normal text. as not all fonts are with users. if you want ur site to be as a text one that is users shall be allowed to be selected. Than having all these funky or even fonts that are elegant but not default will be unknown to your audience’s pc. So use fonts that are already installed in every pc.
  5. It I never a requirement to fill a page up, so be cautious. You might loose visitors because of this.
  6. Knowing which technology to use when? Well this is not really a tip but it is an important aspect in website development. Why? If you know there are many technologies in the market. Which one to use? Well it depends all on your requirements… there are many technologies now. Go through tutorials for help regarding what technology.

7.      Pick a host that suits you, your requirements as it matters. Don’t forget google about the hosts reviews etc…

8.      Keep sites name easy to remember if I have a site called xyz.com it is easy to remember rather than a2D3sdfs1d4333.org.pk

9.      See professionals work. Highly recommended. They are the pros. Look at how they do it. You might get inspired by some gurus.

So good luck and start designing, developing and coding a website.:)




Posted on May 31st, 2009 by Mutedart  |  No Comments »