• Source Code – Eliminating HTML Margins

    Date: 2011.02.24 | Category: WebDesign | Response: 0

    Since the inception of the very first HTML document, margins existed that surrounded the document, like in the case with this document.

    The margins are there to act as a cushion between the edges of the browser and the contents of the page, so it’s easier to read the content.

    As good as margins are, wouldn’t it be nice to be able to eliminate them in some cases, where the design of the page calls for their termination? While most webmasters think it is not possible to “flush out” the default margins of a HTML document, it actually is, although only possible in IE 3+, and NS 4+. In this tutorial, I’ll show you how.

    Eliminating The Document Margin In IE 3+

    To get rid of the document margin in IE 3 and above, so content presses right against the edges of the browser, use the IE exclusive “leftmargin” and “topmargin” attributes:

    <body leftmargin=”0″ topmargin=”0″>

    It’s as simple as that!

    Eliminating The Document Margin In NS 4+

    To get rid of the document margin in NS 4 and above, use the NS 4 exclusive “marginwidth” and “marginheight” attributes instead:

    <body marginwidth=”0″ marginheight=”0″>

    Putting It All Together.

    By putting the two techniques together, we can create a document that flushes out its’ margins in both IE 3+ and NS 4+:

    <body leftmargin=”0″ topmargin=”0″ marginwidth=”0″ marginheight=”0″>

    Try out the above coding on your page, and you’ll see what I mean.

    Article written by Lee

  • The Negative Marketing Technique

    Date: 2011.02.24 | Category: Promotion | Response: 0

    Negative marketing is a wonderful thing in its own right however, negative marketing can, surprisingly enough have a NEGATIVE effect on your sales.

    How many times have you seen a site that has, about half way down the page some text telling the surfer no to click on anything because ‘these are only counters’?

    Counters in themselves can be VERY useful tools to the adult webmaster however, counters are given to us for free because of one simple reason, the graphics used on them are made in such a way that they will actually draw clicks from your traffic.

    Most of the time however, these counters that take your hits are helping you much more than you know, from giving you addition traffic, valuable surfer stats and many other things.

    Now, the same is also true for banner exchanges as is for counters, they are a useful addition to the variety of tools available for adult webmasters however, many webmasters, as mentioned above tell the surfer NOT to click on them, something i just never seemed to be able to get my head around. As you reading this post kind of proves, tell someone not to do something and you can guarantee they WILL do it

    However, as i started off this quick article saying, Negative marketing is a good thing, after all, you have now got the proof to tell you that it works why not put this to use on your site?

    For example, rather than telling a surfer…

    ‘Click Here For The Hottest Porn Site On The Web’

    Tell them…

    ‘DO NOT CLICK HERE’

    Wonder what they will do

    Article written by Lee

  • Geo Targeting – What Exactly Is It?

    Date: 2011.02.22 | Category: General, Promotion | Response: 0

    As the adult industry reaches further and further across the online global community we are beginning to realize the importance of our foreign surfers, gone are the days of shifting them off to a dialer site instead, we find more and more companies actually using geo-targeting techniques to filter and monetize this profitable traffic more but, how does geotargeting work and, more importantly, is it any good? They are the questions we will look at in this article.

    GEO::IP – The Basics.

    The Geo::ip module is a relatively simplistic database of IP addresses and, the matching country to which the IP address belongs. This means that the GEO::IP module can be used for a variety of purposes including automatically selecting the language and countries of your visitors, for credit card fraud detection, and for software export controls.

    Geo Targeting – The Basics.

    As described above, the GEO::IP module is what drives any and all forms of geographical location targeting system (geo targeting). Geo targeting is the method most commonly used in the adult industry to either send a surfer to a localized version of a paysite or, send them off to a dialer in an attempt to monetize them it works by checking either the surfers browser language, country ip address or, both of these.

    Putting Geo Targeting To Work.

    Despite what most webmasters may think about the complexities of geo targeting and the GEO::IP Module for Perl they are easy to use and implement and, furthermore, there are cost free and highly effective ways of using geo targeting on your sites to monetize your international traffic. Lets look at two easy free solutions for webmasters to geo target their traffic.

    JavaScript.

    Using JavaScript you could add the following code between your HTML <head> and </head> tags to redirect international traffic to a specific url on your server:

    <SCRIPT LANGUAGE=”JavaScript1.2″>
    <!– Begin
    if (navigator.appName == ‘Netscape’)
    var language = navigator.language;
    else
    var language = navigator.browserLanguage;

    if (language.indexOf(‘en’) > -1) document.location.href = ‘english.shtml';
    else if (language.indexOf(‘nl’) > -1) document.location.href = ‘dutch.shtml';
    else if (language.indexOf(‘fr’) > -1) document.location.href = ‘french.shtml';
    else if (language.indexOf(‘de’) > -1) document.location.href = ‘german.shtml';
    else if (language.indexOf(‘ja’) > -1) document.location.href = ‘japanese.shtml';
    else if (language.indexOf(‘it’) > -1) document.location.href = ‘italian.shtml';
    else if (language.indexOf(‘pt’) > -1) document.location.href = ‘portuguese.shtml';
    else if (language.indexOf(‘es’) > -1) document.location.href = ‘Spanish.shtml';
    else if (language.indexOf(‘sv’) > -1) document.location.href = ‘swedish.shtml';
    else if (language.indexOf(‘zh’) > -1) document.location.href = ‘chinese.shtml';
    else
    document.location.href = ‘english.shtml';
    // End –>
    </script>

    Php.

    Using .php you can add the following to your sites pages to redirect traffic based on their browser language.

    <?
    $user_lan = $HTTP_ACCEPT_LANGUAGE;

    if($user_lan==’de’) {
    ## German
    $redir_url = “http://www.germanlanguagepageurl.com”;

    } elseif($user_lan==’fr’) {
    ## French
    $redir_url = “http://www.frenchlanguagepageurl.com”;

    } elseif($user_lan==’it’) {
    ## Italian
    $redir_url = “http://www.italianlanguagepageurl.com”;

    } elseif($user_lan==’es’) {
    ## Spain
    $redir_url = “http://www.spanishlanguagepageurl.com”;

    ## US traffic or Rest of world not defined above
    } else {
    $redir_url = “http://www.yourmainpageurl.com”;

    }

    header(“Location: $redir_url”);
    exit;

    ?>

    As you can see from the above two examples, monetizing your international foreign traffic is a relatively easy step and, with the right sponsors to send this traffic to you will be able to reap the profits of countries that other webmasters are not targeting yet.

    Geo Targeting – Overview.

    When all is said and done geo targeting can be a cost effective way to increase your bottom line profits, whether using a free method as described above or, using one of the many filtering services available on the net you should start to monetize your global surfers. One thing you should also consider however is that far from sending your international traffic to a dialer you should search around and find a good mix of adult affiliate programs with a variety of localized paysites, this in itself will enable you to see just how much traffic you have been wasting by using dialers in the past and, it will also allow you to realize the full potential of your new found geo targeted adult traffic.

    Article written by Lee

  • Formatting HTML Text Using Tags

    Date: 2011.02.22 | Category: WebDesign | Response: 0

    Formatting HTML Text Using Tags.

    As we know there are many elements to a website from graphics to text. In this article we are going to have a closer look at text and, more importantly how we format the text to look like we want it to.

    The text of the HTML pages we create, as you already know goes inside the <body> tag of our HTML pages but, unless you are using a WYSIWYG editor you can not just click a button and make it appear bold or italic therefore we need to get to know some of the text property tags that can be used to enhance our HTML text. Lets take a look at some of these now.

    <b> Any text inside these two tags will appear bold on our page</b>
    <i> Any text inside these two tags will appear in italic on our page</i>
    <u> Any text inside these two tags will appear to be underlined on our page</u>
    <big> Any text inside these two tags will appear BIG on our page</big>
    <small> Any text inside these two tags will appear small on our page</small>
    <sub> Any text inside these two tags will appear subscript on our page</sub>
    <sup> Any text inside these two tags will appear as superscript on our page</sup>

    There are also things called ‘heading tags’ these will work the same as the formatting tags mentioned above however there are only six of them and they look like this <hx> with the x being replaced by a number from 1-6 the lower this number is in the tag the LARGER our text will become so for example:

    <h1> Will be the largest heading text</h1>
    <h2> Will be the next smallest heading tag</h2>
    <h3> Will be smaller again </h3>
    <h4> Will be one size smaller again</h4>
    <h5> Will be the second to smallest heading size</h5>
    <h6> Is the smallest of the heading tags</h6>

    Also, you should remember that it *IS* possible to use more than one of the text tags in any single line of portion of text on our web page so for example, if i wanted to have bold underlined italic text my tags for the text would look like this:

    <b><i><u>This text is bold, in italics, and underlined</u></i></b>

    You will notice from the above example that the tags were opened and closed in the same order they were created this doesn’t have to be done like this but, in the long run, it is easier for you as a webmaster to code your pages this way.

    Hopefully this article has given you a further understanding on how we can format out text and you will be bale to put this into practice on the next site you build.

    Article written by Lee

  • Obscenity – Put It To The Test

    Date: 2011.02.23 | Category: Writing | Response: 0

    Regardless of how long any of us have been an adult webmaster we all need to be
    aware of obscenity laws and, in particular how they affect our businesses
    whether we think a hardcore photoset is ‘obscene’ or not ultimately, if you get
    taken to court on obscenity charges the one thing you should be aware of is how
    the courts will decide whether the images you are using will be classified as
    obscene or not.

    Testing Obscenity – The Miller Test.

    The Miller test was developed in the 1973 court case of Miller vs. California
    and in comprises of three parts ALL of which MUST be satisfied on order for
    something to be deemed obscene by the courts. The Miller test is the ‘official’
    method used by the United States Supreme Court for determining whether an
    expression or a speech can be determined as obscene and, if deemed obscene, it
    is not protected under the First Amendment and is therefore prohibited by law.

    The Miller Test – Part One.

    Part one of The Miller Test states something may be obscene if ‘the average
    person, applying contemporary adult community standards, would find that the
    work, taken as a whole, appeals to the prurient interest’ In essence, this
    means that if the ‘average’ person on a jury or on the bench finds the work to
    be deemed obscene then, it is. However for the court to rule something as
    obscene it also has to be deemed obscene by the standards set in part two and
    part three below.

    The Miller Test – Part Two.

    Part two of The Miller Test states that something is potentially obscene is
    ‘the average person, applying contemporary adult community standards, would
    find that the work depicts or describes, in a patently offensive way, sexual
    conduct’. Basically this is saying that if the images or speech is something
    which is not practiced in a manner befitting your local community standards
    then again, it may be obscene. However, as with part one of The Miller Test for
    a court to find something obscene it needs to fall below the standards in part
    three below.

    The Miller Test – Part Three.

    Part three of The Miller Test states that something is potentially obscene if,
    ‘a reasonable person would find that the work, taken as a whole, lacks serious
    literary, artistic, political, or scientific value.’ This is pretty much where
    you could potentially come unstuck after all, everyone has different sexual
    tastes and because of this, just because something that may be widespread such
    as ‘bare backing’ (to use as an example) could potentially be considered as
    obscene if you happen to have a jury who are devout practicers of safe sex.

    The Miller Test – Overview.

    In essence The Miller Test is a useful guideline for webmasters when it comes
    to operating our sites and specifically, when it comes to choosing the types of
    content we utilize on them however, for the most part The Miller Test itself is
    outdated. Since the early 70’s when this test was devised there have been many
    sexual practices that were once deemed obscene that have become more a part of
    everyday life and accepted in to society as whole thus, what once would (or
    could) have been deemed obscene would no longer be in the same sense as
    something that may be deemed obscene today could be found not to be in 5 years
    time.

    Article written by Lee

  • Writing Your Sales Text – Some Facts

    Date: 2011.02.21 | Category: Writing | Response: 0

    Do you know the difference between writing sales text for print advertising i.e. magazines and, writing sales talk for websites?

    Well some of these differences will go against your intuition however, these differences are based on how people read specific items.

    Where Do Eyes Go First When Your Page Loads?

    Contrary to what most webmasters think it may not always be towards the thumbnails and banners on your page instead, surfers eyes will more than likely go to the first few lines of text on the page therefore, your first chance at making a sale before the surfer starts to burn your bandwidth is to have some enticing text on any site or page you build. Another reason why learning to write good text links can benefit you long term.

    Also, as most surfers will only look at a page for between three and fifteen seconds before they decide whether they want to stay on the site they are at or close it this now starts to question webmasters use of heavy graphics on their sites, if a graphic takes three to four seconds to load you have just lost valuable sales time on your site.

    How Much Of Your Copy Do Users Actually Read?

    On average surfers will read about 75% of the length of any given page. Again, this is good news because it now means we can draw our surfers attention tot he ‘important’ sections of our sites by using headlines and bullet points to make them stand out. Also, this means that, given surfers will read only the first 75% of any page that the bottom half of your pages may not be as important as what was first believed.

    Why Do Most Banner Ads Produce Poor Click-Through Rates?

    Again as with any advertising media there is only a specific time frame that anyone will look at something, in this case it has been found that the vast majority of surfer will spend a mere 1.25 seconds looking at a banner which, is about enough time to read say 5 words based on the average college students reading time of 350 words a minute.

    Therefore, banners which are animated and can take up to 5 seconds to get all the information across may in effect be completely worthless on our sites. More bad news for webmasters who have fancy animations and the likes on our pages.

    Why Is Reading Online More Frustrating Than Reading Print?

    Did you know that reading text on a computer screen can cause your reading ability to slow by up to 25% in some cases? This means that over inflating pages with text heavy content may actually aggravate the surfer instead of draw there attention! But, how can we stop this from potentially losing us a sale? Simple here are a few suggestions.

    Rather than having one long continuous stream of text have several smaller one or two line paragraphs of text.

    Use headlines to summarize what you are telling the surfer for example, if you sponsor has free trials tell them in bold lettering ‘Free Trials’ you get the point across and, you may draw their attention to click on the text.

    Are Your Web Page Users Not Getting The Whole Picture?

    Can surfers ‘scan’ your website? Lets look back at the above figures, 75% of the page gets read, banners have an attention span of only 1.25 seconds on average, that’s not much time for a surfer to look at your pages.

    I think that would probably explain the reason why surfers tend to ‘scan’ our sites and only concentrate on the free images, how many of us actually take the time to read word for word EVERYTHING on a page?

    I know I hardly do I just sit there and scan the page for things that draw me into the text or site. This is true again for surfers in fact, estimated figures show that roughly 21% of surfers actually spend the time to read every single word on any site meaning the other 79% only scan through our sites this again, cuts down our marketing capabilities dramatically making it more important to have headlines and well laid out pages highlighting the part we want our surfer to look at, namely, our sponsor links.

    If we do not do this we are in effect only making 21% of our marketing efforts count again, taking away from our profits. That’s a huge chunk of our surfers we are losing out on gleaming a sale from.

    What do all of the above figures tell us? Simple, we need to keep our pages quick loading, concise and more importantly unique, we need to draw our surfers to the specific areas that we want them to go to first and, in the process we should start to make more money from each of our sites.

    Article written by Lee

  • Utilizing All The Content You Use On TGP Galleries!

    Date: 2011.02.24 | Category: TGP | Response: 0

    Utilizing All The Content You Use On TGP Galleries!

    For the last few months i have been experimenting with a few new (but old, if ya see what i mean) ideas.

    Basically i have adapted Voltars 3x3x3 project slightly and incorporated it into the TGP/TGP2 game.

    The results have given me some of the best sales ratios ever! We’re talking under 1:60 almost consistently across all sponsors!!

    What you did is thus….

    Design a NICE 15 pic tgp gallery in a table preferably four rows high and 5 columns across.

    In the first row place one thumb in each cell (5 pics).
    In the second row place one odd sized banner in the first cell and merge cells 2,3 , 4 and, 5.
    In the cells you have merged place some descriptive text about the pics you are using in under two paragraphs and include a line of text where you MENTION the sponsors site name.
    In row 3 place one thumb in each cell (5 pics).
    in row 4 place on thumb in each cell (5 pics).
    under the table place a juicy text link.
    below this juicy text link leave a line or two and add a money bar (one row by three columns using a contrasting color to the background of your gallery page).
    ALL pics go on html pages using the same layout as your main TGP page but, without the table included.
    Repeat this process 4 times once for four different niches, saving each niche in their own sub folder for the main site i.e:

    url/sub folder/niche 1
    url/sub folder/niche 2
    url/sub folder/niche 3
    url/sub folder/niche 4

    You should now have 4 TGP galleries using 15 pics on each in four niches (60 pics in total).

    At the top of each of these main pages place a three cell one row table.

    in this table use text links to describe each niche i.e:

    Teen
    Gay
    Lesbian
    Mature

    in the template for the teen niche you use text for the gay, lesbian and, mature templates and link these to the appropriate TGP template.

    This is where the fun begins…..

    Take all four TGP niche galleries you have just made and do the following….

    Delete the first row of cells (including pics) on all TGP galleries and save the new page layout in another folder using the same navigation structure as the original ie:

    url/sub folder 2/niche1
    url/sub folder 2/niche2
    etc
    etc

    You should now have the following:

    four TGP templates consisting of 15 pics each.
    four TGP templates consisting of 10 pics each.

    Again, link these new 10 pic templates to each other in the same way as you did the 15 pic templates.

    Repeat this procedure to make the 10 pic TGP page using the original TGP page BUT, this time, delete the bottom row of cells.

    You now have the following:

    4 niche 15 pic TGP pages
    4 niche 10 pic TGP pages
    ANOTHER 4 niche 10 pic TGP pages

    Still with me?

    Its gets better….

    Take your original 15 pic TGP template and do the following…

    Delete the first and the third row of cells including all the pics and save them in ANOTHER folder using the same structure as before i.e:

    url/sub folder 3/niche 1
    url/ sub folder 3/niche 2
    etc
    etc

    Again link these in the same way as before using the text links at the top of the pages.

    What do you have now?

    4 TGP pages using 15 pics
    8 TGP pages using 10 pics
    4 TGP2 pages using 5 pics

    Can you guess what’s next?

    Take that original template again and…

    Remove the first and fourth row of cells do the same when you save it as you have done above…

    What do you have?

    4 TGP pages using 15 pics
    8 TGP pages using 10 pics
    8 TGP2 pages using 5 pics

    Do it once more using the original templates but removing the final set of 2 rows of cells you now have…

    4 TGP pages using 15 pics
    8 TGP pages using 10 pics
    16 TGP2 pages using 5 pics

    In the root of the domain where you are going to upload these pages do the following…

    Create a simplistic warning page… link this to a multi site FPA… this multi site FPA links to each of the niche (15 pic) TGP templates you have made.

    On this same fpa place an email erotica collection box, banner exchange code and a toplist counter code along with an exit console going to a MC POTD program.

    Now, what you need to do is start submitting these pages to the TGP/TGP2’s submit one a day or as many as you can until you have submitted them all.

    Ok still here?

    Next you have to duplicate ALL of the above again.

    Place the duplicate of the above into a separate set of folders/sub domains etc.

    On the new root you have created, link to another multi site FPA AND the first root index.html page.

    You now have the makings of an EXCLUSIVE 3x3x3 TGP hub which, you can leave alone and submit all of the pages intermittently to any TGP/TGP2 you wish for LIFE!!

    All the time you are adding new sections to it and building your link pop in the search engines because you are continually interlinking to each of the separate niche and relevant sub niche folders.

    Of course, you NEED to get the meta’s sorted on the first main template for this to work but, if you change all subsequent meta descriptions etc you’ll have a very reasonable listing in Google for the relevant search terms :)

    Article written by Lee

  • Mirroring Adult Sites – Stage One.

    Date: 2011.02.23 | Category: Promotion, Tutorials | Response: 0

    In this next series of tutorials I will be exploring the benefits of utilizing your existing content to build more sites in the least amount of time possible, in fact, after you have completed the steps in this tutorial series you should be able to build over 20 types of site within 5 minutes using a single set of 50 pictures.

    So, onto the start of our tutorial.

    Stage one in this tutorial is something we have ALL done before, so what you need to do is this…

    Build a 50 pic free site, this is using a lot more content than a ‘standard’ free site however, what we are actually going to be making is a set of AVS sites and several TGP galleries, along with some SE pages and also some links list mirrored pages using this set of 50 images by building just ONE site! Sounds impossible? It isn’t… read on….

    Your site should have the following on it:

    1) Warning Page (index.html)
    2) Menu Page (menu.html)
    3) Gallery Pages (5 galleries of ten pictures called gallery1.html, gallery2.html etc)
    4) HTML Large image pages x 50 (picpage1.html, picpage2.html, etc.)
    5) Multi Site FPA (fpa.html)

    Now lets break these individual pages down into sets of instructions for each:

    Warning Page.

    This should have your standard warning text placed on it, along with an enter AND an exit link. The ‘enter’ link should link to your Multi Site FPA and the ‘exit’ link should go to a program such as the ARS Discreet Browser tour page.

    Menu Page.

    This should be a page containing an odd sized banner, links to your 5 gallery pages, plus text links at the bottom of the page ideally, these text links should be in the same style as the niche tables we created for the surfer trap except they should only contain 4 cells instead of 8. These links should go to a different ‘niche’ as the one you are building your current site for and, link to the existing FPA’s of your surfer trap.

    Gallery Pages.

    On your gallery pages, ALL of the thumbnails should be linked to the relevant HTML page with a text link at the top and at the bottom of the HTML page (No Banners are to be used on the gallery pages!) Also, the file names of the images should be pic1.jpg, pic2.jpg, etc for the full sized images and, thumb1.jpg, thumb2.jpg etc for the thumb nailed images. your images MUST be named this way!!

    Multi Site FPA.

    This should link to the individual FPA’s that you should already have on your server if you followed the surfer trap tutorial series (If you did not create this surfer trap the tutorials can be found at this link) as well as linking to the Single Site FPA’s this should also have a ‘no thank you’ link which goes to your Menu Page.

    Images.

    You need to have 50 images, you also need to have 50 thumbnails for the content you will be using on this site. I usually select my content by the niche I am building for, rename the images using The Rename then, once renamed I use Thumbnailer from Smaller Animal to create the thumbnails for each of the renamed images. This will give you 50 full sized pictures with 50 thumbnails named respectively for the larger image.

    They are the basics, now onto the good stuff…

    Once you have created these pages you need to create some folders on your Hard Drive which will be the SAME structure you will have on your server. This folder structure should look somewhat like this once you have saved each of the pages we have just created into their respective sub folders:

    FreeSite/index.html
    FreeSite/AVS/
    FreeSite/FPA/fpa.html
    FreeSite/Galleries/gallery1.html, gallery2.html, gallery3.html, etc, etc.
    FreeSite/Images/pic1.jpg, etc.
    FreeSite/Images/Thumbs/thumb1.jpg, etc.
    FreeSite/LinkList/
    FreeSite/Menu/menu.html
    FreeSite/PicPage/picpage1.html, picpage2.html, etc.
    FreeSite/Recips/
    FreeSite/Engine/
    FreeSite/TGP/

    This will give you 5 folders with HTML pages in them, one folder with the full sized images, one with thumbnails in it and five empty folders.

    At this point we will end the first stage in this tutorial as this should take you a couple of hours to complete.

    Article written by Le

  • Cascading Style Sheet Basics

    Date: 2011.02.21 | Category: WebDesign | Response: 0

    CSS (Cascading Style Sheets) have been around for a while now, and act as a complement to plain old HTML files.

    Style sheets allow a developer to separate HTML code from formatting rules and styles. It seems like many HTML beginners’ under-estimate the power and flexibility of the style sheet. In this article, I’m going to describe what cascading style sheets are, their benefits, and two ways to implement them.

    Cascading What’s?

    They’re what chalk is to cheese, what ice-cream is to Jell-O they complement HTML and allow us to define the style (look and feel) for our entire site in just one file!

    They get their name from the fact that each different style declaration can be “cascaded” under the one above it, forming a parent-child relationship between the styles.

    They were quickly standardized, and both Internet Explorer and Netscape built their latest browser releases to match the CSS standard (or, to match it as closely as they could).

    So, you’re still wondering what a style sheet is? A style sheet is a free-flowing document that can either be referenced by, or included into a HTML document (Kind of like using SSI to call a file but not, if that makes sense). Style sheets use blocks of formatted code to define styles for existing HTML elements, or new styles, called ‘classes’.

    Style sheets can be used to change the height of some text, to change the background color of a page, to set the default border color of a table the list goes on and on. Put simply though, style sheets are used to set the formatting, color scheme and style of an HTML page.

    Style sheets should really be used instead of the standard , < b >, < i > and < u > tags because:

    One style sheet can be referenced from many pages, meaning that each file is kept to a minimum size and only requires only extra line to load the external style sheet file

    If you ever need to change any part of your sites look/feel, it can be done quickly and only needs to be done in one place: the style sheet and furthermore, it is done globally.

    With cascading style sheets, there are many page attributes that simply cannot be set without them: individual tags can have different background colors, borders, indents, shadows, etc.

    Style sheets can either be inline (included as part of a HTML document), or, referenced externally (Contained in a separate file and referenced from the HTML document). Inline style sheets are contained wholly within a HTML document and will only change the look and layout of that HTML file.

    Open your favorite text editor and enter the following code. Save the file as styles.html and open it in your browser:

    Cascading Style Sheet Example.

    h1
    {
    color: #636594;
    font-family: Verdana;
    size: 18pt;
    }

    This is one big H1 tag!

    When you fire up your browser, you should see the text “This is one big H1 tag!” in a large, blue Verdana font face.

    Let’s step through the style code step by step. Firstly, we have a pretty standard HTML header. The page starts with the tag followed by the tag. Next, we use a standard tag to set the title of the page we are working with.

    Notice, though, that before the tag is closed, we have our tag, its contents, and then the closing tag.

    h1
    {
    color: #636594;
    font-family: Verdana;
    size: 18pt;
    }

    When you add the style sheet code inline (as part of the HTML document), it must be bound by and tags respectively. Our example is working with the tag. We are changing three attributes of the ’s style: the text color (color), the font that any tags on the page will be displayed in (font-family), and lastly, the size of the font (size).

    The code between the { and } are known as the attributes. Our sample code has three. Try changing the hexadecimal value of the color attribute to #A00808 and then save and refresh the page. You should see the same text, just colored red instead of blue.

    An Example Of An External Style Sheet.

    External style sheets are similar to internal style sheets, however, they are stripped of the and tags, and need to be referenced from another HTML file to be used.

    Create a new file called “whatever.css” and enter the following code into it:

    h1
    {
    color: #a00808;
    font-family: Verdana;
    size: 18pt
    }

    Next, create a HTML file and name it test.html. Enter the following code into test.html:

    External Style Sheet Reference Example.

    This is one big H1 tag!

    As mentioned above, you can see that the actual code in whatever.css is exactly the same as it was in the inline example. In our HTML file, we simply place a tag in the section of our page. The rel=”stylesheet” attribute tells the browser that the link to the external file is a style sheet. The type=”text/css” attribute tells the browser that whatever.css is a text file containing CSS (cascading style sheet) declarations. Lastly, the href=”whatever.css” attribute tells the browser that the actual file we want to load is whatever.css.

    Conclusion.

    Well, there you have it, a quick look at style sheets and how to implement both an inline and external version. Checkout the links below if you’ve never worked with cascading style sheets before. You will be surprised at some of the things you can do with them!

    Article written by Lee.

  • Using Basic Server Side Includes (SSI)

    Date: 2011.02.24 | Category: WebDesign | Response: 0

    Server side includes are what their name sounds like.  A way to include the contents of another file into your current web page BEFORE the web page gets sent off to the surfer.  Not only does this include contents of a static file but you can also include the results of a CGI program and on some web servers, you can even have it display the current date and time.

    Now, many web hosts do not normally have server side includes turned on. You will have to ask your host if they have SSI turned on and if they do, what is the file name extension for SSI.  By default, SSI files have an .shtml extension.

    Sometimes, you can turn SSI on yourself.  If you host doesn’t have SSI turned on for you already, you can try adding the following two lines to your .htaccess file.  Then create a file with the .shtml extension, include a SSI command and see if it works.

    AddType text/html .shtml
    AddHandler server-parsed .shtml

    When you use SSI commands, you place them exactly in the location within your web page where you want the output of the SSI command to appear when you finally browse the page.  If you have SSI, then you can use the following command to include a file.  When you include a file, you can either give it a path name to the file or you can give a URL to the file. I’ll list both here.

    <!–#include file=”/some/path/above/my/web/to/my/header.html” –>

    This is an example of how to include a file based on its path name.  Now,
    here’s the same file put included with its URL.

    <!–#include virtual=”/to/my/header.html” –>

    And this is an example of how to use a URL.  With a URL however, it cannot be a complete URL such as http://www.somesite.com/somefile.html.  It has to be within your current website.  You can also use the URL method to run a CGI script!  Here’s an example of that:

    <!–#include virtual=”/cgi-bin/somescript.cgi?myfirstarg=1amp;mysecondarg=2″
    –>

    As you can see, we can even pass arguments to the CGI script just as if you typed it into your browser!  There is also another way of running a CGI script but this is not as widely used any more and you should use the #include virtual method instead.  Here is the same example so that you will know what it means when you see it.

    <!-exec cgi=”/cgi-bin/somescript.cgi?myfirstarg=1amp;mysecondarg=2″ –>

    As I mentioned earlier, you can use SSI to display the current time and date. Here’s how:

    <!-echo “$DATE_LOCAL” –>

    This will display the current date and time. SSI is usually used when you  want to have a standard header or footer on each page.  It’s also used for displaying rotating banners or page counters. As you see above, you can also  use it to display the current date and time or the date when the page was  last modified.

    SSI has also been used for cloaking and some tracking  software uses SSI to track each incoming hit to the web page.  If you would  like more information about SSI, go to
    http://www.apache.org/docs/mod/mod_include.html.  This is the definitive guide on SSI on the Apache web server.

    Most other web servers that use SSI also follow these conventions.

    Article written by Lee

Premium Sponsors















Categories

Site Links