Nov 8, 2009

Integrating Html And Css

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > How-To's and Tutorials > Websites and Web Designing

Integrating Html And Css

aggie
QUOTE(the_aggie10 @ Trap17.com)
Ok. Well i am writing this as a series of tutorials i will be doing on this subject, so enjoy. I hope this helps.


Introduction to HTML and CSS

HTML and CSS are to work together. HTML is what puts the characters on the page, while CSS is what makes everything look outreageous! For instance, I would use HTML if i wanted to put "Trap17 is the poop!" onto my page, although if i wanted to make it look nice like this by adding a font, and maybe some color, then I would use CSS.

Learn the HTML.
Ok this is my little into. to HTML.
In order to get words to appear on a page I would put
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <body>
          <p> This is the text that would appear!</p>
          </body>
          </html>

Now it does not matter how much you indent, or if you indent at all, but I do it cause it is easier to read through. So you have typed this into your text editor, such as notepad. Now it is time to see how it looks! Ok, save it as tutorial.html. Then go to your internet browser and click on File>Open> click on your file and BOOM! There it is. Congratulations, your first page (only applies to those who it applies to heh) Well you might have noticed it doesn't look very spiffy. Which is where the CSS comes in. But before we move onto that let me explain something. CSS adds stuff such as color or font. But you can still do a good bit of stuff in HTML for instance if you wanted to make the text bold it would be
CODE
<b>  Bold text here  </b>

This would look like this <b>Bold text here</b> Also this line:
QUOTE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
is a <b>doctype</b>, which holds the rules for different versions of HTML.


Learn the CSS
Well now that you have gotten just a glimpse of HTML it is time to move on to styling it, which is what CSS does. You can do CSS directly from the HTML document or do it from a totally different document, I personally do it from a totally different one.
So, say that I wanted to style that text that we did previously.
CODE
p {
                           font-family: Arial, Helvetica, sans-serif;
                           color: blue;
                           }

Lets dissect this shall we? Ok the very first character "p" is a selector. It selects all of the "p" elements in the HTML. The "font-family" is of course fonts, but it is saying that the first choice is Arial, and if that is not available then Helvetica, or if all else fails sans-serif. As you could have guessed, the last part is saying that the color is to be blue. You cant really look at this without the HTML, so take a look at the next section!

Linking the two together
In case you were wondering, these two don't just magically find each other. To link the two together you add a link element to it. Here is an example: say you saved the above code as style.css, then in the HTML before you put the closing head tag (</head>) you would add
CODE
<link href="style.css" rel="stylesheet" type="text/css" />
So, you have got the HTML document from earlier saved as tutorial.html correct? Well go in there and add the link element, so ultimately it will look like this:
CODE

        <html>
            <link href="style.css" rel="stylesheet" type="text/css" />
    <body>
          <p> This is the text that would appear!</p>

        </body>
        </html>
          

Now save that file. and go to your internet browser, and again File>Open>tutorial.html and there you go, the text looks good, but you may have noticed the background looks like total poop, that is for next time. I hope you enjoyed this!

-Aggie

 

 

 


Comment/Reply (w/o sign-up)

FirefoxRocks
First of all, you should teach HTML, you should teach XHTML.

Second of all, y did you put yoru tutorial in quotes?

Comment/Reply (w/o sign-up)

Chesso
Looks like he was quoting his own post from another from (namely trap17) and it might contain content written by another.

Makes sense to me.

I'd leave the doctype and strict out of a starters tutorial though, I think that should be covered as a seperate topic for HTML/XHTML.

Comment/Reply (w/o sign-up)

jlhaslip
Chesso,

The DTD is an integral part of the page and it would be best if it was included in all pages, especially beginner's pages, since an absence of the DTD causes Browsers to go in to Quirks Mode. Quirks Mode is not good if you are attempting to get your page to behave the same in all Browsers. Each Browser interprets thing differently using Quirks Mode, you see, so forcing the Browser into Standards Compliance Mode is critical.

It is diffucult enough to obtain Cross Browser compatability with a DTD, and more difficult without one.

Comment/Reply (w/o sign-up)

Vyoma
Up until now, I have been using a 'Transitional' DTD for all my webpages.

I heard it somewhere that W3C is suggesting everyone to use 'Strict' DTD. That way, the standardization of browsers would see the light of day.

But I find it a bit hard to actually stick to Strict DTD in some senarious where all the content is not under my control in dynaic senarios.

Comment/Reply (w/o sign-up)

Chesso
That's right Vyoma, you can't get far without breaking the strict DTD.

But if your not going to teach someone what the purpose is of the DTD, it will only serve to confuse them.

Comment/Reply (w/o sign-up)

saint-michael
QUOTE(FirefoxRocks @ Oct 30 2006, 06:47 PM) *

First of all, you should teach HTML, you should teach XHTML.

Second of all, y did you put yoru tutorial in quotes?


Actually it best to start off with the 4.01 just to get a basic understanding of it. Then once someone gets a good understanding of html then move on to xhtml.


Agree with that you seldom find any strict xhtml sites, well at least I haven't, just because of how hard it is to keep it within those properties. I have seen some good templates using the strict DTD format.

Comment/Reply (w/o sign-up)

Chesso
And when you bring PHP and Database into the score of things it's near impossible heh heh.

But if your going to include a DTD at all, there should be atleast a basic explanation as to what purpose it serves, to help save on confusion.

Comment/Reply (w/o sign-up)

aggie
QUOTE(FirefoxRocks @ Oct 30 2006, 05:47 PM) *

First of all, you should teach HTML, you should teach XHTML.

Second of all, y did you put yoru tutorial in quotes?

yea its cause you cant put tut's from trap17 onto asta without them. but thanks for the compliments everyone. and beginners should learn the basics of both.

Comment/Reply (w/o sign-up)

borlafu
Begginners should learn XHTML, the strincter the better.

HTML is wrongly designed from the beginning, it only makes new designers get cofused.

XHTML is properly standardized, and is compatible with XML.

The idea is to separate the CONTENT from the DESIGN and that is what XHTML + CSS is all about.

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : integrating, html, css

  1. 4 Html Based Website Tips
    (4)
  2. Coding Html Properly In The New Age
    (15)
    In all your html there are things you want to follow. Always use lowercase for your HTML Tags
    Don't use upper case. Upper case is bad (this can be hard to do if your like me and tend to
    write and then for closing:P). CODE Types of Staff Administrators: SilverFox,
    Danmidas Above: Bad Code Below: Good Code CODE Types of Staff Administrators:
    SilverFox, Danmidas Use Self-Closing Tags In html certain tags (ex. img, br, hr) didn't
    need closing tags. However its best to write them with something called self-closing tags. ....
  3. Ajax+php+sql=simply Superb!(with Visitor Tracking) :: Section 2 (retrive Values From Database And Dynamic Update!)
    A small tutorial to explain integrating php, ajax and MySQL Database (4)
    Hi all.. This the Section 2 for my previous tutorial about storing values in background using ajax!
    Please have a look at here: Astahost.com/ajax-php-sql-simply-superb-visitor-tracking-t15502.html
    Introduction! We are going to create 2 background script files. One to get values from
    the main page input field and store all values including visitor details ( IP Address, Input Value,
    Visitor Agent etc) to database and the 2nd one for retrieving all values from database and display
    it in the screen! We are going to 2 separate pages first and then going to i....
  4. A Tutorial For Html Color Codes
    (7)
    HTML Coloring System - RGB Values RGB which stands for Red, Green, Blue. Each can have a value from
    0 (none of that color) to 255 (fully that color). The format for RGB is - rgb(RED, GREEN, BLUE),
    just like the name implies. Below is an example of RGB in use. Red, Green, and Blue Values:
    bgcolor="rgb(255,255,255)" White bgcolor="rgb(255,0,0)" Red bgcolor="rgb(0,255,0)" Green
    bgcolor="rgb(0,0,255)" Blue HTML Color Code - Breaking the Code The following table shows how
    letters are incorporated into the hexadecimal essentially extending the numbers system to 16 values....
  5. {} Changing Font Color / Size {}
    Basic HTML for beginners (14)
    Changing the Size of your Font: - So you've got basic text on your website but its JUST
    not what you want. Why not change the size of your font. It can both attract and reject viewers so
    becareful how you use it. This tutorial will show you how to do that in very easy, basic steps!
    Getting Started.. - Changing the size of your font is quite easy. It requires TWO tags. These two
    tags require the Brackets and ending brackets (tags) . If you do not put the ending tag, the font
    size will effect your entire website, changing it to that font size. Below is wha....
  6. {} Html'ing & Basic Codes {}
    Basic coding HTML for beginners! (0)
    ** I was looking through the tutorials page and I saw one tutorial on beginning HTML, I thought I
    would expand a little on it and show ya some basic codes you can use for your website if your
    beginning HTML! ** Beginning HTML HTML isnt all that hard. Once you get the hang of it, its
    quite a breeze, but sense your starting out new and would like some basic help on how to do simple
    things regarding HTML heres a little help for you! First off, lets start out with what HTML means
    and what you need to write it. * HTML - H ypertext M arkup L anguage which is a....
  7. Html Meta Tags Tutorial
    -What it is/does; how to utilize it- (21)
    So, you've got your beginning page started, your homepage is defined, neat, and it looks like
    everyone will love it - STOP. Do you really think your site will be even accidently view by anyone,
    even if you do have a bought domain?! Don't kid yourself; the fact of the matter is, you're
    just one infantesimle speck in the universe of much greater websites than yours. Don't worry,
    though - I got your back. Here, I'm gonna explain what meta tags are, and what they're used
    for. I'm also going to show how to utilize them for your site, to increa....
  8. Starting Your Website With Html
    To build a website, you need to know HOW (7)
    I was reading through the tutorials, and it seems throughout the tutorials, no one has ever really
    taught how to build a beginner's page using HTML. Not that it's anyone's fault, but
    if someone is unsure of how to begin and end a page with HTML, then they will not be able to make a
    page. So, I figured I'd lend a hand... -------------------------------------------- To begin
    your first webpage using HTML, you will need these tags* (in this order): CODE YOUR TITLE
    FOR YOUR PAGE THIS IS WHERE YOUR MAIN TEXT GOES To explain: The ....
  9. Upgrading Your Site!
    Move from HTML 4.01 to XHTML 1.0 (0)
    I planned to post 3 different parts because of the length, but so there's no confusion, I'll
    just make one big tutorial all together /cool.gif" style="vertical-align:middle" emoid="B)"
    border="0" alt="cool.gif" /> . ====================================== (A note to the moderators:
    Alright, I've got this down now, so please delete all of my other posts besides this one, and
    any posting credits as well; thanks!) ====================================== Now the tutorial:
    Concerning those in the webmaster biz... If you are an aspiring experienced webmaster, the....
  10. Creating Tooltips
    DHTML, HTML, CSS, Javascript... (7)
    Here is a little tutorial to make those small yellow-background boxes (tootltips) that pop-up for
    some links that describe them when you hover the mouse over them, it uses DHTML, CSS, HTML, and
    Javascript, so it gives us a much more wide range than my previous tutorials that just where on
    HTML. OK, so here we go... Put this right under CODE var offsetxpoint=-60 //Customize x
    offset of tooltip var offsetypoint=20 //Customize y offset of tooltip var ie=document.all var
    ns6=document.getElementById && !document.all var enabletip=false if (ie||ns6) var tipobj=doc....
  11. Three Html/ Css/ Javascript Tutorials
    (6)
    Here are some tutorials that always get great results when I post them. Lesson 1 HTML means Hyper
    Text Markup Language. HTML is a very common language used for many websites, is the base for more
    complicated and powerful langauges like php, HTML can seem hard, but you will find it is one of the
    easiest langauges one can learn. The core of HTML is the tag, a tage is just a set of two
    arrows-like brackets created by hitting Shift and the comma key, or Shift and the period key. They
    look like this... HTML HTML > Tags start a change in the way a webpage ....
  12. Uploading A Html Format Page
    (0)


      Looking for integrating, html, css

See Also,

*SIMILAR VIDEOS*
Searching Video's for integrating, html, css
advertisement



Integrating Html And Css

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com