Documente Academic
Documente Profesional
Documente Cultură
More paragraphs
<p>
This paragraph contains a lot of lines in the source code, but the browser ignores it.
</p>
<p>
This paragraph
contains a lot of spaces
in the source code,
but the browser
ignores it.
</p>
<p>
The number of lines in a paragraph depends on the size of your browser window. If you resize the
browser window, the number of lines in this paragraph will change.
</p>
Background
<body background="background.jpg">
</body>
Font
1. BACKGROUND COLOR
<body bgcolor="green"> <!--specify the background color of the page-->
2. BASEFONT
<basefont face="arial" size="4" color="#FF0000"> <!--basefont is use to specify the overall font of your page-->
3. FONT COLOR
Hello! This is my page <br>
<font color="#FF0000" size="3" face="arial">
This local text looks different</font><br>
This text looks like the first one.
4. FONT FORMAT
A. Background Color
<h2 style="background-color:red;">This is a heading</h2>
<p style="background-color:blue;">This is a paragraph.</p>
B. Font Style
D. Pre Element
<pre> <!--Text in a <pre> element is displayed in a fixed-width font (usually Courier)-->
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both spaces and
line breaks
</pre>
E. The Q. Element
<h2>The q Element</h2> <!--short quote-->
<p>The q element defines a short quotation.</p>
F. Definition List
<dl> <!--use to create a definition list-->
<dt>January</dt> <!--use to create definition terms-->
<dd>First month of the year.</dd> <!--use to create definition details-->
<dt>February</dt>
<dd>Second month of the year.</dd>
</dl>
5. FONT LAYOUT
A. Width of Horizontal Line
<hr width="75%">
B. Paragraph Alignment
<p align="left"> Paragraph alignment = LEFT </p>
<p align="right"> Paragraph alignment = RIGHT </p>
<p align="center"> Paragraph alignment = CENTER </p>
<p><center> Center Text </center></p>
<div align="center"> Center Text </div>
<div align="left"> Left Text </div>
<div align="right"> Right Text </div>
C. Non-Breaking Space
Non Breaking Space - A common character entity
used in HTML is the non breaking space.
6. ADDRESS
<address>
Dilbert H.<br />
1234 Anim Street<br />
P.O. Box 22222
</address>
Bulleted list
Tag used <ul> </ul> - unnumbered list
1. Disc bullets list
<ul type="disc">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ul>
2. Circle bullets list
<ul type="circle">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ul>
3. Square bullets list
<ul type="square">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ul>
4. A nested List
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
<ul>
<li>China</li>
<li>Africa</li>
</ul>
</li>
</ul>
<li>Milk</li>
</ul>
Numbered list
<ol> </ol> - ordered list
1. Numbered list
<ol>
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
2. Numbered list starts at Number 5
<ol start="5">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
3. Letters list
<ol type="A">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
4. Lowercase letters list
<ol type="a">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
5. Roman numbers list
<ol type="I">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
6. Lowercase Roman numbers list
<ol type="i">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
7. Roman Number List starts at Number 7
<ol type="I" start="7">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
Images
<!--alt is the the text that goes with the image-->
1. Inserting Image
<img src="smiley.jpg" alt="Smiley face" width="42" height="42"> <!--inserting image-->
2. Size of the Image
<img src="smiley.jpg" alt="Smiley face" width="75" height="75"> <!--change the size of the image-->
3. Add Border to the Image
<img src="smiley.jpg" alt="Smiley face" width="42" height="42" border="2"> <!--add border to the image-->
4. Add space and under image
<img src="smiley.jpg" alt="Smiley face" width="42" height="42" Hspace="25" Vspace="25"> <!--add space
over and under image-->
5. Moving Image
<img src="smiley.gif" alt="moving smile" width="48" height="48"></p>
Note that the syntax of inserting a moving image is no different from a non-moving image.
6. An image from another folder:</p>
<img src="images/happy.jpg" alt="Sad Face" width="33" height="32"><p>An image from W3Schools:<!--image
from another folder--> </p>
<img src="smiley.jpg" alt="Smiley face" width="42" height="42" align="right"> <!--image on the right corner-->
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla <br>
8. Image Link
1. Specific Website
<a href="http://www.yahoo.com" target="_blank"> <!--this will link you to specific website of your choice-->
<img src="smiley.jpg" width="100" height="100"> </a>
<p>Click on the image to go to Yahoo.</p>
2. Link to itself
<a href="smiley.jpg" target="_blank"> <!--this will link to itself-->
<img src="smiley.jpg" width="100" height="100"> </a>
<p>Click on the image to view the same image.</p>
Link
<a> </a> anchor tag
1. Color of the Link
<body link ="green" vlink="yellow" alink="red">
<!--link=standard link, vlink= visited link, alink=active link-->
2. Creating Links
1. Open in new window
<a href="http://www.yahoo.com/">Click to go to Yahoo. </a> <br> <!--this will open in the same window-->
2. Open in same window
<a href="http://www.yahoo.com/" target="_blank">Open yahoo in a new window!</a> <!--this will open
yahoo in a new window-->
3. Color On Text Links
<a href="http://www.yahoo.com/" target="_blank" ><font color="red">Open yahoo in a new window!
</font></a> <!--the color of link is different-->
4. Image Links
1. Same Page
<a href="link.html"> <img src="smiley.jpg" border="0" width="42" height="42" alt="link to this page">
</a> <br> <!--image link to the same page-->
2. New Page
<a href="images.htm" target="_blank"> <img src="smiley.gif" border="0" width="42" height="42"
alt="link to this page"> </a> <br> <!--image link to a new page-->
3. Link to Webpage
<a href="http://www.yahoo.com/"> <img src="smiley.jpg" border="0" width="42" height="42" alt="link
to yahoo"> </a> <br> <!--image link to yahoo-->
5. Links Within a Page
<a href="#bottom">Click here to go to the bottom of the page</a>
<p>Batangas State University </p> Batangas State University </p> Batangas State University </p> Batangas
State University </p> Batangas State University </p> Batangas State University </p>
<p>Batangas State University </p> Batangas State University </p> Batangas State University </p> Batangas
State University </p> Batangas State University </p> Batangas State University </p>
<a name="bottom">The bottom of the page</a>
6. Link to Email
<a href="mailto:canadajefferson@gmail.com"> Email us </a>
Table
HTML tables start with a table tag.
Table rows start with a tr tag.
Table data start with a td tag.
<th> tag defines a header cell in an HTML table
2. ColSpan
1. Column
<table>
<tr>
<td colspan = 2> Column 1 Merged </td>
</tr>
<tr>
<td>Column 1 Row 2</td> <td>Column 2 row 2</td>
</tr>
</table>
2. Row
<table>
<tr>
<td> Column 1 Row 1 </td><td rowspan =2>Row 1 Merged with Row 2</td>
</tr>
<tr>
<td>Column 1 Row 2</td>
</tr>
</table>
3. Table Alignment
Note: summary - The summary attribute provides information about the table's contents
<tr>
<th>Stock Symbol</th>
<td>MSFT</td>
<td>GOOG</td>
</tr>
<tr>
<th>Profit</th>
<td>$723.48</td>
<td>$1254.58</td>
</tr>
</table>
<p>
This example demonstrates multiple attributes as follows:
</p>
<p>
align - The table is aligned to the right. <br>
bgcolor - The background color is set using a color name. <br>
border - The border width is set to three pixels wide. <br>
summary - The summary attribute provides information about the table's contents. <br>
</p>
Forms
1. Input Type
<form>
<input type="text" name="username">
<input type="password" name="pwd">
<input type="button" value="Log-in">
<input type="checkbox" name="Log in">
</form>
2. Text Area
<form action="" height="50px">
<textarea name = ABOUT YOURSELF cols = "21" rows = "2">
First Name
</textarea>
<form action="">
Birthday:
<select name="Birthday:">
<option value="January">January</option>
<option value="February">February</option>
</select>
<form action="">
<select name="Day:">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
</select>
<form action="">
<select name="Year:">
<option value="">1985</option>
<option value="">1986</option>
</select>
</form>
</form>
</form>
4. Radio Button
<form>
Gender:
<input type="radio" name="sex" value="male">Male
<input type="radio" name="sex" value="female">Female
</form>