www.webdeveloper.com
Results 1 to 5 of 5

Thread: HTML 5 Validation: Whitespace in Path Component

Hybrid View

  1. #1
    Join Date
    Apr 2013
    Posts
    23

    HTML 5 Validation: Whitespace in Path Component

    Hi there,

    I am currently using DreamWeaver to publish a web site, and my web pages are having trouble passing HTML validation. I realized that all the errors are associated with images, so when I got rid of them, my web pages validated.

    Here, are the series of errors I received when I tried to validate my master web page.

    ↑ Top
    Validation Output: 6 Errors

    Error Line 47, Column 27: Bad value assets/images/kyoto protocol white.jpg for attribute src on element img: Whitespace in path component. Use %20 in place of spaces.

    alt="Kyoto Protocol"></div>

    Syntax of IRI reference:
    Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.

    Error Line 49, Column 40: Bad value assets/images/kyoto protocol white resized.jpg for attribute src on element img: Whitespace in path component. Use %20 in place of spaces.

    height="210" alt="Kyoto Protocol"></div>

    Syntax of IRI reference:
    Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.

    Error Line 131, Column 20: Duplicate ID box.

    <div id="box"> "the average global temperature on Earth has increased by …


    Warning Line 114, Column 20: The first occurrence of ID box was here.

    <div id="box"> "In the centre was also the question of how to relieve the…


    Error Line 148, Column 78: Bad value assets/videos/1880-2011 temp anomaly.mp4 for attribute src on element source: Whitespace in path component. Use %20 in place of spaces.

    <source src="assets/videos/1880-2011 temp anomaly.mp4" type="video/mp4">

    Syntax of IRI reference:
    Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.

    Error Line 149, Column 77: Bad value assets/videos/1880-2011 temp anomaly.mov for attribute src on element source: Whitespace in path component. Use %20 in place of spaces.

    <source src="assets/videos/1880-2011 temp anomaly.mov" type="vide/ogg">

    Syntax of IRI reference:
    Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.

    Error Line 150, Column 63: Bad value assets/videos/20 sec 5 year mean 1881-2007.mov for attribute href on element a: Whitespace in path component. Use %20 in place of spaces.

    …="assets/videos/20 sec 5 year mean 1881-2007.mov">10 Year MeanAnomaly 1881-2007

    Syntax of IRI reference:
    Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.
    When looking at the errors, I noticed the message that I should "use 20% instead of spaces." Does anyone know how to achieve this?

    As far as the images go, I essentially included them in my code, using the width and the height of its actual size. So, I am having trouble figuring out why they are causing me trouble. Unless, I can figure this out, I will probably have to get rid of them, on all my pages.

    Hopefully, someone can give me help.

  2. #2
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    Just delete the whitespace and type %20 instead. Example: " src="assets/videos/1880-2011%20temp%20anomaly.mov" type="vide/ogg"> ". Better, is to not use compound folder/file names. Example: Example: " src="assets/videos/1880-2011-temp-anomaly.mov" type="vide/ogg"> " Some browsers will stop at the first whitespace in a path and give you a 404 error. Also, suggest using all lowercase for folder/file names.

    The same named IDs can only be used once per page. Use a class instead.

    Also, see this page.
    Last edited by Major Payne; 05-14-2013 at 01:18 AM.

  3. #3
    Join Date
    Apr 2013
    Posts
    23
    Quote Originally Posted by Major Payne View Post
    Just delete the whitespace and type %20 instead. Example: " src="assets/videos/1880-2011%20temp%20anomaly.mov" type="vide/ogg"> ". Better, is to not use compound folder/file names. Example: Example: " src="assets/videos/1880-2011-temp-anomaly.mov" type="vide/ogg"> " Some browsers will stop at the first whitespace in a path and give you a 404 error. Also, suggest using all lowercase for folder/file names.

    The same named IDs can only be used once per page. Use a class instead.

    Also, see this page.
    Thank you very much all your assistance. I used your instructions about using the %20 characters and it worked.

  4. #4
    Join Date
    Apr 2013
    Posts
    23
    Quote Originally Posted by NorrinRadd View Post
    Thank you very much all your assistance. I used your instructions about using the %20 characters and it worked.
    Thank you very much for all your assistance.

  5. #5
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    You're very welcome. Good luck with all your projects.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles