Which is better?

Discussion in 'HTML & Website Design' started by mystickcal, Jul 23, 2006.

  1. #1
    I know html very well. However my question is...what is the best one to be using... html, xhtml, dhtml, php, etc. Also can everyone list some of their favorite tutorial sites for each one. Also can everyone list some tuts for css...

    Edited: Also can you list why certain ones are better than others. Give examples, reasons, whatever. I know people are going say it depends on what you are designing. Please don't leave it at that lol...Explain to me what each one does and its features and stuff! Thank you all for your help!
     
    mystickcal, Jul 23, 2006 IP
  2. digigraph

    digigraph Guest

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    HTML is only good when designign simple and static webpages. I would use PHP because of its functionality and usefulness. PHP is a powerful language.
     
    digigraph, Jul 23, 2006 IP
  3. brunozugay

    brunozugay Peon

    Messages:
    150
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Getting into an in depth explanation on what's what really makes no sense unless you have a full grasp of the fundamental differences between markup (XHTML), presentation (CSS), client-side scripting (Javascript/DHTML/AJAX), and server-side scripting (PHP, ASP.NET).
     
    brunozugay, Jul 23, 2006 IP
  4. candidindia

    candidindia Peon

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Excellent brunozugay !!

    It's really good to make a positive comment rather than a remark. I agree with what you say.
     
    candidindia, Jul 24, 2006 IP
  5. ing

    ing Well-Known Member

    Messages:
    500
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    195
    #5
    I'm still learning and I often end up at www.w3schools.com when not sure how to do something. They have tutorials on all the things you mentioned in your post mystickcal.

    Hope that helps. :)
     
    ing, Jul 24, 2006 IP
  6. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    brunozugay is right on the money.

    For your content/markup, definitely use XHTML. It is a "newer version" of HTML, and is helping to move toward consistency and accuracy. CSS is what you use for styling. If you want a font to be larger, you use CSS NOT a font tag. For client-side effects (i.e. to have the viewer's browser do "something") such as simple form validation, use JavaScript. For server-side (i.e. the server does all of the calculations and sends the results to the viewer so they never see the code), I prefer PHP.

    As ing said, w3schools is a great site. I commonly use it as a reference when using tags and such that I don't frequently use. For php, just use the php.net site for reference, and you can add /function (replacing "function" with the function name) to quickly look up a function.

    I think it is important to know at least a little of all of these when designing a site, but it really depends on your goal. If you just have some static pages, xhtml + css will do it fine. If you need to use a database, PHP + MySQL is a good way to go.
     
    Gordaen, Jul 24, 2006 IP
  7. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Actually, at the moment, HTML is probably the better choice.

    XHTML vs HTML FAQ
     
    FeelLikeANut, Jul 24, 2006 IP
  8. brunozugay

    brunozugay Peon

    Messages:
    150
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Here are some of the reasons why FeelLikeANut might feel HTML is a better choice:

    • XHTML 2.0 will not be backwards compatible
    • HTML 5 suports backwards compatibility
    • Serving XHTML as application/xhtml+xml doesn’t work in IE

    I however always use XHTML 1.0 because it can be referred to as a transitional stage between the HTML 4.01 and XHTML 1.1.

    Since the 1.0 version is designed to be compatible with HTML 4.01, a content type of text/html MAY be used, unlike XHTML 1.1 where application/xhtml+xml MUST be used.
     
    brunozugay, Jul 24, 2006 IP
  9. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Though it's actually not. Using a strict doctype, whether XHTML or not, is much more important to making the transition.

    Though, there is much you can do in XHTML that is not at all compatable with HTML. XHTML is compatable only if you don't take advantage of its benefits.

    Of course, doing so defeats all purposes of using XHTML.

    I don't mean this harshly, but please don't speak for me.
     
    FeelLikeANut, Jul 24, 2006 IP
  10. brunozugay

    brunozugay Peon

    Messages:
    150
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I apologize if I offended you in any way since that was never my intention, I was merely trying to state a few reason why some people thought HTML was a better choice between the two since you've only made a statement. Just stating so, doesn't make it so.

    In any case, there are good arguments on both sides of the fence.
     
    brunozugay, Jul 24, 2006 IP
  11. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I linked to a "XHTML vs. HTML FAQ". The information provided there supports the recommendation.
     
    FeelLikeANut, Jul 24, 2006 IP
  12. brunozugay

    brunozugay Peon

    Messages:
    150
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I saw the link, and read the post, but I found it to be more of an explanation rather than a recommendation.

    The author himself uses content negotiation on his own blog to serve XHTML 1.1 to Firefox and HTML 4.01 to Internet Explorer.

    That's why I wrote what I wrote.

    Anyhow, I don't think mystickcal was interested in all the specifics when he posted this thread. :)

    FeelLikeANut, I have to admit, it's a good feeling to see somebody around here who cares enough to actually know the difference between the two.
     
    brunozugay, Jul 24, 2006 IP
  13. TechnoGeek

    TechnoGeek Peon

    Messages:
    258
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Hello, mystickcal.
    I think you are a little confused. HTML is the base and the root of the Web. Any way you choose, you will end using HTML, so it is not a matter of deciding between HTML and other languages. HTML is a markup language that defines the structure of a document; CSS can be used to specify how this document will be presented to the reader; PHP can be used to provide the page's content by searching databases, etc. All of them work collaboratively to achieve a goal, so as you said it all depends on what you want to do.
     
    TechnoGeek, Jul 24, 2006 IP
  14. mystickcal

    mystickcal Active Member

    Messages:
    621
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    70
    #14
    Okay let me explain a little more. I know html...very well in fact...can do anything with it. I however do not know how to use css which I know I should learn and I am working on it.

    My main question is should I keep using html or is there better things to use nowadays. For example xhtml...which I know there are debates about.

    Also I know alot of people say to use php because you can use html inside of a php page and then if you ever need to add php code you can without having to convert your html files into php files? Is this true?

    See I'm a bit confused...
     
    mystickcal, Jul 25, 2006 IP
  15. TechnoGeek

    TechnoGeek Peon

    Messages:
    258
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #15
    As in many things, it all depends in what you want to do. It can be accepted that using CSS is optional because, although many people would say that you *must* use CSS, the reality is that you can get along with HTML. There are things that CSS can do that HMTL can't, but they are mainly cosmetic. Another thing is when you talk of JavaScript or PHP. Learning any of these two will certainly add to your capabilities as a webmaster. JavaScript is in the root of DHTML, and PHP is very useful to build highly complex, interactive sites.
    By the way, it is not that you "use HTML inside of a PHP page." The opposite is true, PHP is a scripting language that can be embedded in HTML, just as JavaScript, but the page must be named as *.php. Just because of this, you can write an HTML-only page and name it as *.php and it will work.
     
    TechnoGeek, Jul 31, 2006 IP
  16. swirl1980

    swirl1980 Peon

    Messages:
    53
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #16
    although i agree with wot ppl have said above about using CSS over standard (X)HTML, there are times wen i find it very frustrating!!!! For example, if u want to put a simple alt tag on an image through css - u can't (as far as i know)!!!!

    If ur wanting to keep up with current design standards i'd try to get with the XHTML standard (not much of a jump from standard HTML tbh) and try n use CSS as much as u can. As for scripting, if u have the time then learning somthing like PHP / MYSQL can be extremely useful, especially if u'll be wanting a webmaster type job!!!

    If u've "Mastered" html then i'd have a look into css and then javascript. Understand the concepts of simple programming by doing the javascript then move onto PHP - theres far more to it then just extracting and outputting info from a DB!!!! Just my opinion :)
     
    swirl1980, Aug 1, 2006 IP
  17. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #17
    That is because alt text (alternative text) is content and was always meant to be kept in the realm of HTML.
     
    FeelLikeANut, Aug 1, 2006 IP
  18. swirl1980

    swirl1980 Peon

    Messages:
    53
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #18
    but wot i dont get is if every1 is wanting ppl to get into css design as opposed to using tables etc but stopping u using the alt tag, especially wen its apparently an important part of SEO???
     
    swirl1980, Aug 2, 2006 IP
  19. adris72

    adris72 Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    You don't need to stop using the alt tag, actually, if you don't use alt tag in a image inserted in your page the xhtml won't validate.
    As FeelLikeaNut said, alt tags are for content, background images are for decoration, so they don't need alt tags. If you need the alt tag, use "img src" instead of put a background in the css.
     
    adris72, Aug 2, 2006 IP
  20. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #20
    To clarify/add: the alt tag is an alternative to the image. This is especially useful for text-only browsers and text-to-speech interpretters. Every image should be there for a reason, so every img tag should have an alternative. If an image is for the background, it should be included using styles and thus doesn't require a alternate. You don't need to know a background is "black with little white dots that are supposed to look like stars." It can be purple with green polka dots for all the browser/interpretting software cares.
     
    Gordaen, Aug 2, 2006 IP