SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    May 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need help with HTML.

    I am learning to build websites using HTML and so far I am understanding it fairly well but I can not seem to get links to work in my favor. If someone could please review my html and tell me what I am doing wrong. I have reviewed this over and over again but I can not seem to find my error. Thanks you for reading this and hopefully pointing out my error. Markup below!

  2. #2
    SitePoint Member
    Join Date
    May 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Contact Us at website</title>
    <meta charset="utf-8"/>
    </head>
    <body>
    <div id="header">
      <div id="Site branding">
        <h1>mywebsite.com</h1>
      </div>
      <div id="tagline">
        <p>Home for parts and accesories.</p>
      </div>
    </div>
    <! - - End of the first headers div - - >
    <div id="navigation"
    <ul>
      <li><a href=" index.html ">Home</a></li>
      <li><a href=" about.html ">About us</a></li>
      <li><a href=" contact.html ">Contact Us</a></li>
    </ul>
    </div>
    <! - - end of navigation links - - >
    <div id="bodycontent">
      <h3>Contact us</h3>
      <p>To find out more, Contact owner "Albert Einstien, or whatever you wish to put" at "Buisness Number" or <a href="mail to:test@live.com">email test@live.com</a>.</p>
    </div>
    <! - - This email link is not right but im not sure why. - - >
    </body>
    </html>
    Last edited by DaveMaxwell; May 17, 2013 at 10:00. Reason: added code tag

  3. #3
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,289
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    It should be a href="mailto: not a href="mail to: (note the removed space....)

    Some other comments:


    1) Watch your spaces in id names - Site branding will match to #Site and #branding. You can't do #Site branding. That will match for an element with id of branding inside of an element of id of Site.
    2) You're developing a case of div-itis. Like the "Site branding" div. If all you have in a div is a single element, you probably can get away without them.
    3) You're missing a closing > on div id="navigation"
    4) Watching your spaces around the a elements.

    Code:
    <!DOCTYPE html>
    <html lang="en">
    	<head>
    		<title>Contact Us at website</title>
    		<meta charset="utf-8"/>
    	</head>
    	<body>
    		<div id="header">
    			<h1>mywebsite.com</h1>
    			<div id="tagline">
    				<p>Home for parts and accesories.</p>
    			</div>
    		</div>
    		<! - - End of the first headers div - - >
    		<div id="navigation">
    			<ul>
    				<li><a href="index.html">Home</a></li>
    				<li><a href="about.html">About us</a></li>
    				<li><a href="contact.html">Contact Us</a></li>
    			</ul>
    		</div>
    		<! - - end of navigation links - - >
    		<div id="bodycontent">
    			<h3>Contact us</h3>
    			<p>To find out more, Contact owner "Albert Einstein, or whatever you wish to put" at "Business Number" or <a href="mailto:test@live.com">email test@live.com</a>.</p>
    		</div>
    		<! - - This email link is not right but im not sure why. - - >
    	</body>
    </html>
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style
    Learn how to be ready for The Forums' Move to Discourse

  4. #4
    SitePoint Member
    Join Date
    May 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dave Maxwell Thank you very much for the help it helped me clear all this up. Now everything is working as it should , div-itis was something I was trying to avoid but I guess it got me again thank you for pointing this out.


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
  •