5 replies
  • WEB DESIGN
  • |
I have a few questions. First, can you mix code? For example, html, css, and xhtml when trying to create a page using a simple text editor; will there be issues? Validator flagging everything? Second: if you can mix code, is it considered bad form to do so? I can't see anyway around it, in some cases.
#code
  • Profile picture of the author Content Publisher
    1) Well, XHTML is HTML - it's simply a slightly different version of it (HTML with more XML-like structure). And CSS is designed to be used with XHTML. So yes, you can 'mix' them - in-fact, you're meant to XHTML for the content/structure, CSS for the styles/aesthetics. As for HTML-XHTML: you'll get some minor validation issues if you (say) sometimes use the HTML <br> and sometimes use the XHTML <br />, but nothing will 'break'.

    2) Mixing different tags (e.g. where HTML and XHTML tags vary) is bad form, yep. But XHTML and CSS are meant to be used together/mixed. In-fact it's bad form not to use XHTML+CSS
    Signature
    Follow me as I build my content publishing business from $0 to a full time income.

    "The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value." - Thomas Paine
    {{ DiscussionBoard.errors[4507739].message }}
  • Profile picture of the author leppozdrav
    can you mix code?
    Yes you can!! But affects your SEO, coz it wont pass the validation!

    For example, html, css, and xhtml when trying to create a page using a simple text editor; will there be issues?
    Yes!! In what format you will save it??? There is a posiblity of many tags not getting recognized.

    if you can mix code, is it considered bad form to do so? I
    It is poor form of coding.
    {{ DiscussionBoard.errors[4508009].message }}
    • Profile picture of the author wayfarer
      Originally Posted by leppozdrav View Post

      Yes you can!! But affects your SEO, coz it wont pass the validation!
      Validation has zero affect on "SEO". No one cares about validation except for other web developers.
      Signature
      I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
      {{ DiscussionBoard.errors[4513684].message }}
  • Profile picture of the author WinXPrize
    Yeah piece of cake
    {{ DiscussionBoard.errors[4512128].message }}
    • Profile picture of the author fourthmonkey
      As Expertwebguy mentioned, HTML and CSS are meant to use together. HTML is for layout and CSS for design to keep the source page cleaner. XHTML is HTML but stricter and cleaner.
      {{ DiscussionBoard.errors[4512320].message }}

Trending Topics