Results 1 to 15 of 15

Thread: Guide to Web Page creation.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    krazykarl's Avatar Tech Monkey
    Join Date
    Jan 2005
    Location
    Hamilton, Ontario, Canada
    Posts
    766

    Default Guide to Web Page creation.

    I didnt see a webpage guide in the section, so I thought Id write one.

    Ill start with some basic terminology

    HTML stands for hypertext Markup Language. In essence it is not actually a 'language' but a tagging system. You tag your data, to tell the browser how to display it.

    PHP stands for PHP hypertext preprocessor. PHP is a scripting language, that is run on the server it generates HTML dynamically, based on its code, variables. It was written with MYSQL interoperability in mind, so it works quite nicely with this database.

    CGI Common Gateway Interface, this was how dynamic webpages were created before the advent of PHP, 95% of CGI scripts are written with PERL

    ASP Active Server Pages, this is basically the M$ version of PHP.

    Host This is the server that your webpages physically reside on. This is where all the PHP or ASP code runs.

    Javascript This is a stripped down version of Java, specifically designed to run in a browser. The code runs locally, in your browser.

    Applet An applet runs full fledged JAVA from the JVM in the browser. the code is complied already and then downloaded to the client.

    DNS Domain name system. this is how the address www.whatever.com gets translated into an IP address you can access. Domain names are purely for human use, and the computer doesnt want anything but the IP address. You register your domain with a registrar, whom you will have to pay annually (or monthly) to keep your address, and where it points to.



    For this guide, I will be focusing purely on HTML, if you want to learn PHP or ASP, go take a class on it, or buy a book. Perhaps I will add something later on.

    I would advise creating this in notepad or some other TEXT editor. do not use word or any other wordprocessor.

    some basic pointers

    -All open tags must be closed (IE doesnt whine too badly, but its sloppy coding not to close your tags)
    -Tags such as break <Br /> should be self closing.
    -Indent properly, you will be glad (unfortunately this forum doesnt allow me to add tabs to my posts)

    The first thing any HTML page needs is the tag that tells you its an HTML file

    <HTML>

    and the closing tag

    </HTML>


    the next thing you need is the head section. here you can put tags such as title (which appears in the top bar of the browser)

    <html>
    <head><title>My First Web Page</title>
    </head>
    </html>

    ok so now we have a title, now we need the page itself, the body.

    <html>
    <head><title>My First Web Page</title>
    </head>
    <body>
    <h1 align='center'> This is my Webpage </h1>
    </body>
    </html>

    to change the background colour of your page simply add the attribute as shown here

    <body bgcolor='red'>

    or to add an image as your background

    <body background='www.mysite.com/somepicture.jpg'>

    ok so I put an h1 tag in the page, these are headers, you have h1-h5 h1 being the largest title and h5 being the smallest. you may also have noticed that I put an alignment attribute there. various tags have different attributes such as color (yes i know you have to spell it the silly american way) align,valign etc...

    now when you put text into your page, it will all appear on one line, or autowrap (depending on the browser) This is not a good thing. Good thing we have the <Br /> tag! (break tag) this is the newline charecter for HTML. the other method is the preformatted tag denoted as <pre> Some long piece of preformatted text here</pre>

    The best way to organize your data on a webpage is a table
    here is a snippet of how to create your table

    <table border =1>
    <tr>
    <td>table cell one </td><td>table cell two</td>
    </tr>
    </table>

    this gives you a table with 2 columns and 1 row, with a border of 1 unit around the cells.

    <tr> stands for table row, <td> for table data.

    *you can create as many columns as you want in a row, but remember, the total columns for all rows is the highest number you have created. ex if I have 3 columns in row 1, and 2 in row 2, both will end up with 3 columns while the last one in row 2 will be blank.

    if you want to take up 2 columns with a single cell ad the "colspan=X" (where x is the number of columns) in the attributes portion of the TD tag.

    to create a hyperlink you simply put <a href='www.twcenter.net'>total war center</a> like this

    To further format your text, you can use these tags, embedded inside your other tags.
    <b> THIS TEXT WILL BE BOLDED</b>
    <u> THIS TEXT WILL BE UNDERLINED</u>
    <i> THIS TEXT WILL BE ITALIC </i>

    ex.

    <h1> This is my <b> Total War </b> webpage </h1>

    Make sure when you nest tags, you close them in the same order you open them.

    If you wish to change the font of your text, wrap the font tag around it.

    <font face='times' size='10'> this will be in the times new roman font </font>

    When choosing font faces remember, if the client does not have a particular font installed, they will see the text in the default font. So dont use obscure fonts, or ones that nobody will have ever installed. If you want your cool looking font for a title or something, it would be a better idea to create an image out of it, this will enable everyone to view it properly.

    The image tag.

    The Syntax is <img scr="address of image here" alt='description of image'>

    pretty self-explanitory there.

    Browser specific tags

    I am putting these in here for purely informational purposes (incase you run into them in the wild)
    Note: I do not advocate using these tags, and good web design practices prohibit thier useage.

    <marquee> this text will scroll across the screen </marquee>

    This is an IE specific tag, netscape will ignore it, basically it makes text scroll across the web browser.

    <blink> this text will blink </blink>

    Quite possibly the most annoying tag ever created. It is a netscape only tag, IE will ignore it.
    It makes the text inside the tags blink, simple enough.

    As I said, I do not advocate the useage of these tags, but they do exist, and this is what they do.



    Lastly, make sure you save your file with a .html or .htm file extension

    that should be enough to get most people started, I will perhaps add more to this later, but thats all for now. for more info try www.w3schools.com.

    Enjoy
    Last edited by krazykarl; July 02, 2006 at 12:34 PM.
    -There is no Overkill
    -Apathy causes the least amount of conflict with stupid people

    Check out my Guide to creating webpages
    Under the patronage of Incinerate_IV

  2. #2
    Civitate
    Join Date
    Jul 2005
    Location
    Scotland
    Posts
    13,565

    Default Re: Guide to Web Page creation.

    Thanks of this guide.
    Under the patronage of Rhah and brother of eventhorizen.

  3. #3
    Pent uP Rage's Avatar Tech *********
    Join Date
    Oct 2004
    Location
    Las Vegas
    Posts
    1,842

    Default Re: Guide to Web Page creation.

    nice.

    under the patronage of Emperor Dimitricus, son of the Black Prince
    Before you post, see if your question has already been answered
    here

  4. #4
    imb39's Avatar Comes Rei Militaris
    Patrician Citizen Administrator Emeritus

    Join Date
    Sep 2004
    Posts
    20,872

    Default Re: Guide to Web Page creation.

    Very tempting to sticky this - I'll let those who live down here decide on that. Good stuuf, though!

  5. #5
    Incinerate_IV's Avatar Burn baby burn
    Join Date
    Apr 2005
    Location
    Pennsylvania, USA
    Posts
    2,042

    Default Re: Guide to Web Page creation.

    Cool guide, makes me want to design my own webpage. Then again my creativity is a little on the low side.

    Oh yea, I'll sticky this.
    THE PC Hardware Buyers Guide
    Desktop PC: Core 2 Duo E6600 @ 2.8 Ghz | Swiftech Apogee GT waterblock + MCP655 + 2 x 120mm rad | Biostar Tforce 965PT | G.Skill 4gb (2 x 2gb) DDR2-800 | Radeon HD 4870 512mb | 250GB + 160GB hard drive | Antec 900 | 22" Widescreen

  6. #6

    Default Re: Guide to Web Page creation.

    :hmmm: A quick guide to CSS, Cascading Style Sheets.
    CSS can applied to XHTML (Which is html if anyone asks...well basically anyway) in three ways, but the important to do in the <head> section of a html document is to include <style type="text/CSS"></style> which allows you to use CSS to format how the page looks.

    1.Inline Styles
    Almost every XHTML tag has an optional style attribute <tag style="property1: value1; property2: value2; ... propertyN: valueN">
    which can be used to format what ever is in between the open and close tags <> </>, including nested tags (which is a good thing to remember in tables).

    2.Document-Style Levels
    With this CSS level you do everything at a document level (though Inline Styles are still fine) and format the output of selected tags inbetween the <style> tags in the <head> section as below.

    selector { property1: value1; property2: value2; ... propertyN: valueN }
    eg: body { color: white; background-color: green; text-align: left }
    Also, you can do this for specific tag instances but not others, by using the name or id attribute...suppose you have a div you want to format but have more than one (a div is simply <div>this is a div anything can go here...as long as it is html valid </div>).
    Instead of just doing <div>, do <div name="name"> or <div id="id">
    and then in the <style> section do
    #name { property1: value1; property2: value2; ... propertyN: valueN }

    this way you can use the same for some tags without having to do all the inline styling. Document level CSS is also great for just setting the font for all <p> tags for example.

    3. External Style Sheets
    These are external text files that use the .css extension, an example being mystyle.css
    These files have no html, no <style tags>, they simply have the CSS like so:

    selector/tag1 { property1: value1; property2: value2; ... propertyN: valueN }
    selector/tag2 { property1: value1; property2: value2; ... propertyN: valueN }
    .
    .
    .
    selector/tagN { property1: value1; property2: value2; ... propertyN: valueN }

    And you link to this file from html files using:
    <link rel="stylesheet" type="text/CSS" href="uri">, or for example:
    <link rel="stylesheet" type="text/CSS" href="mystyle.css">
    This goes outside the <style> tags but in the <head> section.

    A last note is that inline styling overrides document level styling, and document level styling overrides external style sheet styling.
    Also, not all tags can use all attributes.
    For more info go to http://www.w3.org/TR/CSS2.

    A brief example:
    Mystyle.css
    #hello { text-align: right }

    html file
    <html>
    <head><title>mytitle</title>
    <link rel="stylesheet" type="text/CSS" href="mystyle.css">
    <style type="text/CSS">
    body { background-color: black; color: purple; text-align: center }
    </style>
    </head>
    <body>
    <h1 style="font-style: italic"> This will be italic</h1>
    <p style="color: red">This text will be red</p>
    <p>This text will be purple</p>
    <div name="hello">
    <p>This will be on the right hand side of the screen</p>
    </div>
    </body>
    </html>

    There you have it...I might do an xml one later on....or perhaps not...but apart from html and CSS the other basic part of a webpage is javascript, so I might do a simple tutorial for that...though it would be very basic.

    Edit: @justinian, it is both sloppy and bad, as on most browsers it will stop the effect of the tag, and either way is not valid html, which can ruin a page. In simple cases you wont see a difference but then again you might.
    Last edited by Aristocrat; July 03, 2006 at 07:55 AM.

  7. #7

    Default Re: Guide to Web Page creation.

    Make sure when you nest tags, you close them in the same order you open them.
    The one thing I've always wondered about HTML and BBcode - is it just sloppy to close them in the wrong order, or does it actually make a difference if you don't close tags in the same order?

    Patron of Felixion, Ulyaoth, Reidy, Ran Taro and Darth Red
    Co-Founder of the House of Caesars


  8. #8

    Default Re: Guide to Web Page creation.

    Can't we just have one general guides and how-tos? After all, we have a awfully large number of these guides....

  9. #9
    Incinerate_IV's Avatar Burn baby burn
    Join Date
    Apr 2005
    Location
    Pennsylvania, USA
    Posts
    2,042

    Default Re: Guide to Web Page creation.

    I guess I'll unstick this after a few weeks... We need to reorganize this place.
    THE PC Hardware Buyers Guide
    Desktop PC: Core 2 Duo E6600 @ 2.8 Ghz | Swiftech Apogee GT waterblock + MCP655 + 2 x 120mm rad | Biostar Tforce 965PT | G.Skill 4gb (2 x 2gb) DDR2-800 | Radeon HD 4870 512mb | 250GB + 160GB hard drive | Antec 900 | 22" Widescreen

  10. #10
    kshcshbash's Avatar My Good Sir CNSW
    Civitate

    Join Date
    Nov 2005
    Location
    Ontario, Canada
    Posts
    736

    Default Re: Guide to Web Page creation.

    Don't forget DOCTYPE! That is #1 way to invalidate your HTML!

  11. #11

    Default Re: Guide to Web Page creation.

    Actually CSS is the best way of seperating content from design.. and this is the standards when creating a webpage...

  12. #12
    kshcshbash's Avatar My Good Sir CNSW
    Civitate

    Join Date
    Nov 2005
    Location
    Ontario, Canada
    Posts
    736

    Default Re: Guide to Web Page creation.

    I meant when you use a HTML validator such as http://validator.w3.org/, a common mistake is missing the DocType.

    Most people overlook it but it is still quite important.


    Just out of sheer curiosity, TWC failed. http://validator.w3.org/check?uri=ht...w.twcenter.net

  13. #13

    Default Re: Guide to Web Page creation.

    Now can we take down the sticky? we have far too many stickties around here......,

  14. #14

    Default Re: Guide to Web Page creation.

    Brilliant.

  15. #15
    Top-Tier-Tech's Avatar Protector Domesticus
    Join Date
    Feb 2009
    Location
    USA, state of Minnesota
    Posts
    4,258

    Default Re: Guide to Web Page creation.

    IBTL ?
    My Gaming PC
    CPU: intel i7-2600k Quad-core @ 3.80Ghz.
    Motherboard: Asus Sabertooth P67
    RAM: 8GB G.SKILL Ares DDR3 1600
    GPU: 2, Zotac 448 core GTX 560ti's in SLI
    Storage: Crucial M4 256GB SSD
    PSU: Corsair CMPSU-1000HX Semi-modular
    Case: Coolermaster Cosmos II XL-ATX Full Tower
    Heatsink: Thermaltake HR-02 Passive CPU Cooler
    Keyboard: Logitech G19 with LCD Display
    Mouse: Logitech G700 Wireless
    Screens: LG Infinia 55LW5600 55 inch LED ~ Cinema 3D ~ 3 in Nvidia 3D Surround

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •