100% found this document useful (1 vote)
5 views2 pages

HTML Structure and Coding Basics

This document provides sample codes for basic HTML elements including overall page structure with <html>, <head>, <title>, and <body> tags; text formatting with <br>, <p>, and <div> tags; links with <a> tags; images with <img> tags; and tables with <table>, <tr>, and <td> tags. Instructions are given for each tag's usage and attributes to display text, links, images, and tables on an HTML page.

Uploaded by

api-3770279
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
5 views2 pages

HTML Structure and Coding Basics

This document provides sample codes for basic HTML elements including overall page structure with <html>, <head>, <title>, and <body> tags; text formatting with <br>, <p>, and <div> tags; links with <a> tags; images with <img> tags; and tables with <table>, <tr>, and <td> tags. Instructions are given for each tag's usage and attributes to display text, links, images, and tables on an HTML page.

Uploaded by

api-3770279
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

[Link].

com

Sample Codes

HTML overall

When you create a new HTML document, you can automatically start with the following structure:

<html>
<head>
<title>
Write here the title of the page.
It will appear in the blue line at the top of the browser window.
</title>
</head>
<body>
Here comes the body of the page.
See the other categories for details.
</body>
</html>

Text effects

<br>
New line

<p>
Paragraph
</p>

<div style="align:left/center/right;color:text color;">


Write here text in style.
For more information, search "Cascading style sheets" or "CSS".
</div>

<bdo dir="ltr/rtl;">
Write here text.
Directions:
ltr - Left to Right.
rtl - Right to Left.
</bdo>

Links

Link to another page:

<a href="[Link]
Link text goes here.
</a>

Open in new window:

<a href="[Link] target="_blank">


Link text goes here.
</a>

Email link:

<a href="[Link]
Link text goes here.
</a>

Images

<img src="[Link] url" alt="alternative text" align="right/center/left">

Tables

<table>
<tr> (table row)
<td> (table cell)
Cell content goes here.
</td>
<td>

</td>
</tr>
<tr>
<td>

</td>
<td>

</td>
</tr>
</table>

You might also like