HTML
DEVELOPMENT
Part 2
HTML Absolute vs. Relative File
Referencing
The main difference between absolute and relative paths is
that absolute URLs always include the domain name of the
site with [Link] Relative links show the path to the file or
refer to the file itself.
Example of relative path: /graphics/[Link]
Example of absolute path:
[Link]
HTML Link Creation
<body>
<p>
<a href=” [Link]
”> <img scr=“” width=“350” height=“250”> </a>
<a href=””> <img scr=“” width=“350” height=“250”> </a>
<a href=””> <img scr=“” width=“350” height=“250”> </a>
<a href=”” > Link name here</a>
<a href="[Link] TNM </a>
<a href=”” target="_blank"> Link name here</a>
</p>
</body>
Anchor Tags
<body>
<ul>
<li> <a href = “#article1”>article 1</a> </li> <br>
<li> <a href = “#article2”>article 2</a></li> <br>
<li> <a href = “#article3”>article 3</a></li> <br>
</ul>
<p> <h1> <a id = “article1”>article 1</a></h1> </p>
<p> It is not an easy process given Ronaldo's contract is one of the biggest in the history of sport. <br> Sky Sports News learned this week United do not
accept some of the criticisms Ronaldo made in the interview. <br> Ronaldo criticised the club for a lack of investment in the 13 years since he left Old
Trafford. Sources have insisted United have invested in their facilities - notably the training ground, restaurant and swimming pool. <br> The Portugal
forward was also critical of Ten Hag but sources insist Ronaldo was treated with respect by the club and the manager. In news conferences, Ten Hag always
maintained Ronaldo had been given time off in pre-season to deal with family matters. <br> It has been confirmed to Sky Sports News there was an offer
from Saudi Arabia in the summer, which United would have accepted but Ronaldo did not want to make the move. <br> There were no other official offers
for the player in the last transfer window. </p>
<p> <h1> <a id = “article2”>article 2</a></h1> </p>
<p>The respective club form of Ramsdale and Saka - along with defender Ben White - means the Gunners have three representatives in Gareth Southgate's
World Cup squad. <br> Saka has certainly let his football do the talking as he ended last season as Arsenal's top goalscorer and has so far this year been
one of their standout players as they sit five points clear at the Premier League summit. <p>
<p> <h1> <a id = “article3”>article 3</a></h1> </p>
<p> Alejandro Garnacho has caused a stir after 'liking' a controversial post on social media that suggested the Manchester United hotshot failed to make
Argentina's World Cup squad for a second time 'because he is Spanish’. <br> Manchester United have been warned that they could lose "one of the best
players in the world" Facundo Pellistri shortly after the World Cup. </p>
</body>
HTML Tables
<body>
<table width=“100%” boarder=“1” boardercolor=“blue” cellspacing =“2” cellpadding=“2”>
<tr>
<th>Subject</th>
<th>Marks</th>
<th>Grade</th>
</tr>
<tr>
<th>English</th>
<th>89%</th>
<th>B</th>
</tr>
<tr>
<th>Chemistry</th>
<th>75</th>
<th>C</th>
</tr>
</table>
</body>
HTML Merging Cells
<body>
<table width=“100%” boarder=“1” <tr>
boardercolor=“blue” cellspacing =“2”
cellpadding=“2”> <td>Feb</td>
<tr> <td>5000</td>
<td colspan = “2”>Expenses</td> </tr>
</tr> <tr>
<tr> <td>Mar</td>
<td>Month</td> <td>1000</td>
<td>Total</td> </tr>
</tr> <tr>
<tr> <td>Total</td>
<td>Jan</td> <td>16000</td>
<td>10000</td> </tr>
</tr> </table>
<tr> </body>
HTML Text Wrapping
<body>
<table width=“100%” boarder=“1”
boardercolor=“blue” cellspacing =“2” <tr>
cellpadding=“2”>
<td>Feb</td>
<tr>
<td>5000</td>
<td colspan = “2” nowrap> Alejandro
Garnacho has caused a stir after 'liking' a controversial </tr>
post on social media that suggested the Manchester
United hotshot failed to make Argentina's World Cup <tr>
squad for a second time 'because he is Spanish </td>
<td>Mar</td>
</tr>
<td>1000</td>
<tr>
</tr>
<td>Month</td>
<tr>
<td>Total</td>
<td>Total</td>
</tr>
<td>16000</td>
<tr>
</tr>
<td>Jan</td>
<td>10000</td> </table>
</tr> </body>
<tr>
HTML Table Cell Alignment
<body>
<table width=“100%” boarder=“1”
boardercolor=“blue” cellspacing =“2” <tr>
cellpadding=“2”>
<td>Feb</td>
<tr>
<td>5000</td>
<td colspan = “2” nowrap> Alejandro
Garnacho has caused a stir after 'liking' a controversial </tr>
post on social media that suggested the Manchester
United hotshot failed to make Argentina's World Cup <tr>
squad for a second time 'because he is Spanish </td>
<td>Mar</td>
</tr>
<td>1000</td>
<tr>
</tr>
<td align=“right”>Month</td>
<tr>
<td align = “center”>Total</td>
<td>Total</td>
</tr>
<td>16000</td>
<tr>
</tr>
<td align= “right”>Jan</td>
<td a>10000</td> </table>
</tr> </body>
<tr>
HTML Form Tags and Attributes
The tag <form></form> is used to create a form in HTML
<label> </label> is used to describe the label for input
<input type=“”> defines the type of text being inputted in
INPUT TYPES
<input type="button">, <input type="checkbox">, <input
type="color">, <input type="date">, <input type="datetime-local">,
<input type="email">, <input type="file">, <input type="hidden">,
<input type="image">, <input type="month">, <input type="number">,
<input type="password">, <input type="radio">, <input type="range">,
<input type="reset">, <input type="search">, <input type="submit">,
<input type="tel">, <input type="text">, <input type="time">, <input
type="url">, <input type="week">
HTML Form Tags and Attributes
<form name=“form name” action=“[Link]” <input type="radio" id="male" name="gender"
method=“post”> required>
<label for=“fname” > Full Name <label> <label for="male">Male</label>
<input type="text" placeholder="Full Name <input type="radio" id=“female"
*" name=“fname" required autofocus> name="gender" required>
<label for =“email”> Email </label> <label for=“female">Female</label>
<input type="email" placeholder="Your <button type="submit" id="button">Submit
email *" name="email" required autofocus> Now</button>
<label for = “phone”> Phone Number
</label>
<input type="text" placeholder="Phone
number *" name="phone" id="phone"
required autofocus>