www.webdeveloper.com
Results 1 to 5 of 5

Thread: I need help with some HTML code:

  1. #1
    Join Date
    Sep 2013
    Location
    Rhode Island
    Posts
    1

    Post I need help with some HTML code:

    Good afternoon, I'm new to this site.

    I'm having some problems with my HTML coding. I would appreciate any help anyone can give me.

    I'm trying to link 2 items together: For instance I'm doing a website on a play, when I click on one of the characters name it should display the specific lines that his/her character has on the other page linked to this site.

    I hope I explained this in english. LOL
    I would appreciate any help at all.

  2. #2
    Join Date
    Sep 2013
    Posts
    221
    Well i think you can use the show/hide content using HTML CSS.
    I've managed to make this action. Below is the example code which you can use.
    HTML:
    <span class="span3" tabindex="0">Romeo</span>
    <span class="span2" tabindex="0">Content</span>
    <p class="alert" >Done by Mr.Jason</p>

    CSS:

    body {
    display: block;
    }
    .span3:focus ~ .alert {
    display: none;
    }
    .span2:focus ~ .alert {
    display: block;
    }

    Hope this helps you.
    strad solutionswww.stradsolutions.com

  3. #3
    Join Date
    Mar 2012
    Posts
    1,639
    The simplest way of achieving something similar to what you ask is by using the TITLE property of the SPAN tag. This is intended for tool tips, but can contain any text you like. Only is is not specific to a linked page. e.g.

    <p>The character <span title="Romeo, Romeo wherefore art thou Romeo...">Juliette</span> 's speech is one of the most well known...</p>

    To do something closer to what you ask would require an IFrame something like:

    <div style="float:left;">
    <p>The character <a href="speeches/speech100.html" target="frame01">Juliette</a> 's speech is one of the most well known...</p>
    </div>
    <iframe name="frame01" width="240" height="240" style="float:right;"></iframe>

    Then in a separate html page called, say, "speech100.html" in the sub-folder "speeches" you would have the speech:
    <html>
    <head>
    </head>
    <body>
    <p>Romeo, Romeo wherefore art thou Romeo...</p>
    </body>
    </html>

    The above is just an outline. The speech document should be a complete, valid html page in its own right.

    Note: By default, web bots can see and index the speech pages separately from the intended web page. One way of getting round that is to put the speech docs in a sub-folder (as suggested) and put an instruction not to index the sub-folder in the robots.txt file. Google "robots.txt" for instructions on how to create a robots.txt file, and where it must be placed.
    Last edited by jedaisoul; 09-29-2013 at 11:50 AM.

  4. #4
    Join Date
    Apr 2013
    Posts
    3
    Thanks for the share
    Quote Originally Posted by jedaisoul View Post
    The simplest way of achieving something similar to what you ask is by using the TITLE property of the SPAN tag. This is intended for tool tips, but can contain any text you like. Only is is not specific to a linked page. e.g.

    <p>The character <span title="Romeo, Romeo wherefore art thou Romeo...">Juliette</span> 's speech is one of the most well known...</p>

    To do something closer to what you ask would require an IFrame something like:

    <div style="float:left;">
    <p>The character <a href="speeches/speech100.html" target="frame01">Juliette</a> 's speech is one of the most well known...</p>
    </div>
    <iframe name="frame01" width="240" height="240" style="float:right;"></iframe>

    Then in a separate html page called, say, "speech100.html" in the sub-folder "speeches" you would have the speech:
    <html>
    <head>
    </head>
    <body>
    <p>Romeo, Romeo wherefore art thou Romeo...</p>
    </body>
    </html>

    The above is just an outline. The speech document should be a complete, valid html page in its own right.

    Note: By default, web bots can see and index the speech pages separately from the intended web page. One way of getting round that is to put the speech docs in a sub-folder (as suggested) and put an instruction not to index the sub-folder in the robots.txt file. Google "robots.txt" for instructions on how to create a robots.txt file, and where it must be placed.

  5. #5
    Join Date
    Sep 2013
    Location
    Houston, Texas.
    Posts
    26


    I am HTML developer, if you need help.

    send me your page with images, I will set it and send back to you.

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