SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Dec 2009
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need CSS How-To For HTML Validation Errors

    I'm actually trying to understand this stuff.

    These are validation errors on my index.html page

    There must be CSS methods (simple!) I can use in lieu of these illegal html calls.

    The content on the index.html page will most likely not be needed on the other pages of the site. That's why I used them here. But hey - THEY WORK!

    I always get into trouble when I have to use two classes in one call. I don't know how to do this.

    HTML Page Errors on validation . . .

    <p style="text-align:center;">We believe our clients are "Properties With Style."</p>
    Error quotation marks found between tags . . .


    <script> <!-- type not specified validation error-->
    Type not Specified

    Here is the script:
    <script>

    //variable that will increment through the images
    var step=1
    function slideit(){
    //if browser does not support the image object, exit.
    if (!document.images)
    return
    document.images.slide.src=eval("image"+step+".src")
    if (step<12)//must represent No. of pictures in above cache
    step++
    else
    step=1
    //call function "slideit()" every 6 seconds
    setTimeout("slideit()",6000)
    }
    slideit()
    </script>

    I do not know what kind of script this is? It just displays pictures but doesn't indicated its type?


    <img src="css/images/rickfade.jpg" width="140" height="200" alt="Ricks Picture" align="left"/>
    <img doesn't have an attribute "align" in current versions


    <P>Don't want to wait? If you have a real estate question or need, please feel free to email us directly at <a href="mailtoropertieswithstyle@gmail.com"><font color="#6CFFFF"><em>Properties With Style.</em></font></a> We will provide you with the professionalism and information that will guide you in making your paramount real estate decisions.</p>
    <p> tag does not conform to upper-lower requirements
    <font> not found in current active versions
    <em> tag not allowed within font


    Thanks . . . Rick

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Regarding the two "Properties[...]" quotes use the character entity reference &quot; or the equivalent NCR or use the correct " because it's hard to tell from that small sample what triggerd that one.

    For the SCRIPT it will most likely by JavaScript and hence requires <script type="text/javascript">

    With the alignment issue don't add the align attribute in most cases it will naturally align left or use CSS.

    The paragraph tags are lowercase and case sensitive in XHTML, i.e. <p> is not <P>, etc. The FONT is deprecated in Strict; use CSS (font-family or color) with a class and SPAN or something like that, and removing the FONT might sort out the EM issue too.

  3. #3
    SitePoint Addict
    Join Date
    Dec 2009
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Robert

    I tried using the &quot; but I surmised because it was inside the style tag that that was why it didn't work.

    I suspected javaScript but there was no indication to me as I'm still a neophyte with this stuff.

    If I use the align="left" then my text WILL flow around the picture. If I rely on the picture to use the CSS float:left; then the text DOES NOT and WILL NOT flow to the right side of the picture. I've worked for hours on this. It's especially frustrating.

    In hours searching I found no method that worked or fit my situation in the various suggestion on how to get text to flow where you want it.

    I didn't see the upper case <P>. Corrected.

    Using CSS how do I declare only specific words within a sentence <font color="#6CFFFF"><em>Properties With Style.</em></font> How do I insert CSS in the middle of a paragraph?

    Thanks Robert

    Rick

  4. #4
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by R Schreiber View Post
    Using CSS how do I declare only specific words within a sentence <font color="#6CFFFF"><em>Properties With Style.</em></font> How do I insert CSS in the middle of a paragraph?
    You don't... that's called presenational markup at which point you're just writing HTML 3.2-style code; failing to grasp the entire POINT of using CSS.

    It sounds to me like you have failed to divine the purpose of semantic markup, separation of presentation from content, and all the other bonuses STRICT markup with CSS gives you. You are thinking presentation like colors and other style in the markup -- that's not what HTML is FOR -- unless again, you're back in 1998.'

    WHY is it getting a specific color? emphasis? some other reason? You don't put it in the paragraph, you use that emphasis to say:

    em { color:#6CFFFF } in your stylesheet.

    if it's just for that specific emphasis, you add a class that says WHY it's getting color:

    markup:
    <em class="us">Properties with Style</em>

    Stylesheet:
    .us { color:#6CFFFF }

    NOT that said example looks like it should be receiving emphasis; it's a title, that's Italic's job.

    If you can't explain WHY it's getting a color with either a tag or a class, it probably shouldn't be getting a color. (and no, saying class="color6CFFFF" is NOT the answer as again that's presenatational markup -- at which point go back to writing HTML 3.2 circa the late 90's)


    But again, if I had my way the STYLE tag would be obsoleted, and the STYLE attribute deprecated for all but a handful of situations where it can actually be used to convey content... as such things have ZERO BUSINESS in the HTML in the first place.

    though without a link to the page in question, anythign we tell you is a wild guess in the dark.


Bookmarks

Posting Permissions

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