Home > OS >  HTML linking the web pages by html [closed]
HTML linking the web pages by html [closed]

Time:10-04

<HTML>
<HEAD>
<TITLE> lINKING </TITLE>
</HTML>
<BODY>
<CENTER>
<FONT SIZE = "5"
<AHREF = "http://www.sankalpsatpute123.wordpress.co.in" >Click here to open Website</A><BR>
<AHREF ="D:/sank.jpeg"> Click here to open a smiley</A><BR>
</FONT>

</CENTER>
</BODY>
</HTML>
I could not add my website and image in this ? what are my mistake's in this.

CodePudding user response:

Problems:

  1. first FONT tag is not closed
  2. AHREF is not valid it should be used as <A HREF="your_url">

Here's the code with problems fixed

<HTML>

<HEAD>
  <TITLE> lINKING </TITLE>

</HTML>

<BODY>
  <CENTER>
    <FONT SIZE="5">
      <A HREF="http://www.sankalpsatpute123.wordpress.co.in">Click here to open Website</A>
      <BR>
      <A HREF="D:/sank.jpeg"> Click here to open a smiley</A>
      <BR>
    </FONT>

  </CENTER>
</BODY>

</HTML>

CodePudding user response:

There are a few mistakes in your markup.

  1. Not everything needs to be upper-case.

  2. You are not closing your head block (</HEAD>).

  3. You're missing a space between your anchor tag declaration and the href attribute.

  4. Your font tag is missing a closing tag (>).

  5. You have one too many HTML closing tags (</HTML>).

This would be the correct markup:

<!DOCTYE html>
<html>
    <head>
        <title> LINKING </title>
    </head>
    <body>
        <center>
            <font size="5">
                <a href="http://www.sankalpsatpute123.wordpress.co.in" >Click here to open Website</a><br />
                <a href="D:/sank.jpeg"> Click here to open a smiley</a><br />
            </font>
        </center>
    </body>
</html>

As a note, the html font tag is deprecated. Instead, you should use CSS to style desired text.

CodePudding user response:

there are multiple syntax errors that need to be corrected. for newbies the best resource for learning web development is

https://www.w3schools.com/

  •  Tags:  
  • html
  • Related