Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML HTML Basics

Simple HTML code doesn't work

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

Simple HTML code doesn't work

Postby amg » Thu Sep 13, 2012 3:23 am

Hi,

I am testing HTML code without any server and it doesn't work. Here is the code:

Code: Select all
<!DOCTYPE html>
<html>
<head>
<title>Home Page</title>
<body>

<h1>My site</h1>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec iaculis posuere justo. Nam vel neque. Proin sagittis mauris sit amet nisl. Sed ipsum. Aliquan vitae
justo.

<h2>Latest projects</h2>
Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat. Aliquam dui ligula, porttitor eu, facilisis vitae,
ornare sed, tortor.<br><br>
<a href="../Portfolio/index.html">Site Projects</a>

<body>
</html>

Code: Select all

<html>
<head>
<title>Links</title>
<body>

<h1>Latest projects</h1>
<a href="../index.html">Home page</a>

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec iaculis posuere justo. Nam vel neque.

<h2>Project 1</h2>
Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat.<br><br>
<a href="/images/Project1.jpg">Image project 1</a>
<h2>Project 2</h2>
Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio sit amet erat.<br><br>
<a href="/images/Project2.jpg">Image project 2</a>
<body>
</html>


When I run the Home Page code in Firefox, I can watch all the information correctly, but when I click on Site Projects link Firefox remains in the same page.

How can I change to the Links page? I have this one in root folder on my computer and the other one in the Protfolio folder also in my computer.

Thanks.
amg
New php-forum User
New php-forum User
 
Posts: 1
Joined: Thu Sep 13, 2012 2:46 am

Re: Simple HTML code doesn't work

Postby kingsemsem » Wed Oct 24, 2012 11:31 am

Hello,
its simple code

**************************************************

<html>
<head>
<title>Links</title>
</head>
<body>

<h1>Latest projects</h1>
<a href="../index.html">Home page</a>

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec iaculis posuere justo. Nam vel neque.

<h2>Project 1</h2>
Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio

sit amet erat.<br><br>
<a href="/images/Project1.jpg">Image project 1</a>
<h2>Project 2</h2>
Etiam consectetuer, mauris vitae cursus scelerisque, dui turpis dignissim justo, et eusimod enim odio

sit amet erat.<br><br>
<a href="/images/Project2.jpg">Image project 2</a>
</body>
</html>
**************************************************************

you forget
1-header end tag </head>
2- back slash in this tag </body>

try this code it will work
kingsemsem
New php-forum User
New php-forum User
 
Posts: 1
Joined: Wed Oct 24, 2012 11:23 am

Re: Simple HTML code doesn't work

Postby johnmacd » Sun Jun 23, 2013 9:39 pm

First check the body tag in your php code. If it is not redirecting then check the path of the file.
johnmacd
New php-forum User
New php-forum User
 
Posts: 19
Joined: Wed Jun 12, 2013 9:30 pm

Re: Simple HTML code doesn't work

Postby aksstgsb » Fri Dec 13, 2013 4:04 am

Your closing </head> tag in missing in the code. Take a look on it.
aksstgsb
New php-forum User
New php-forum User
 
Posts: 13
Joined: Fri Dec 13, 2013 3:57 am

Re: Simple HTML code doesn't work

Postby PreetiGarg » Tue Jan 14, 2014 11:16 pm

The problem in this code is parh. so correct this path...
User avatar
PreetiGarg
New php-forum User
New php-forum User
 
Posts: 14
Joined: Fri Dec 28, 2012 2:27 am

Re: Simple HTML code doesn't work

Postby omitsolutions » Thu Jan 16, 2014 9:08 pm

First of all check the body tag. If it is not redirecting then check the path of the file.
omitsolutions
New php-forum User
New php-forum User
 
Posts: 3
Joined: Thu Jan 16, 2014 8:57 pm

Re: Simple HTML code doesn't work

Postby virinchisoftware » Fri May 02, 2014 3:49 am

Hi,
First of all you should close head tag before body tag open.
May be your path is wrong.
Once try without .. (double dot).

At last, Close body tag before </html>.
User avatar
virinchisoftware
New php-forum User
New php-forum User
 
Posts: 7
Joined: Fri May 02, 2014 3:29 am
Location: Delhi


Return to HTML Basics

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron