Week 11 12 - Basic Web Page Creation Using Static Website and Online Platform PDF
Week 11 12 - Basic Web Page Creation Using Static Website and Online Platform PDF
</tag >
A close tag refers to an html command that
suppresses the previous format used.
Tag parameter is attribute supplementary
command in a tag.
What is HTML Element?
An HTML element is defined by a start tag, some content, and an end tag:
SYNTAX
HTML ELEMENT
HTML ELEMENT
SYNTAX
HTML ELEMENT
HTML ELEMENT
</HTML>
2. <html>
3. </html>
<HEAD> 1.
2.
3.
<!DOCTYPE html>
<html>
<head>
</HEAD>
4. </head>
5. </html>
</TITLE>
2. <html>
3. <head>
4. <title> Title of the document </title>
5. </head>
• The <title> tag defines the title of the document. 6. </html>
The title must be text-only, and it is shown in the
browser's title bar or in the page's tab.
• The <title> tag is required in HTML documents!
<BODY> 1.
2.
3.
<!DOCTYPE html>
<html>
<head>
</BODY>
4. <title> Title of the document </title>
5. </head>
6. <body>
• The <body> tag defines the document's body. 7. The content of the document......
• The <body> element contains all the contents 8. </body>
of an HTML document, such as headings, 9. </html>
paragraphs, images, hyperlinks, tables, lists, etc.
CODE
<A HREF> 1. <a href=“www.google.com”> Google </a>
•
</A>
The <a> tag defines a hyperlink, which is used to
By default, links will appear as follows in all browsers:
•
</B>
The <b> tag specifies bold text without any
extra importance.
CODE
<BR> 1. <br>
•
</CENTER>
The <center> tag was used in HTML4 to center-
align text.
CODE
<FONT> 1. <font style=“ font-size:10; color: red;”> content
</FONT>
</font>
Font Attributes
• font-family
• The <font> tag was used in HTML 4 to specify the • size
font face, font size, and color of text.
• color
<H1></H1> 1.
2.
<h1>This
<h2>This
is
is
heading
heading
1</h1>
2</h2>
<H6></H6>
3. <h3>This is heading 3</h3>
4. <h4>This is heading 4</h4>
5. <h5>This is heading 5</h5>
6. <h6>This is heading 6</h6>
• The <h1> to <h6> tags are used to define HTML
headings.
• <h1> defines the most important heading. <h6>
defines the least important heading.
CODE
<i> 1. <i> content </i>
•
</i>
The <i> tag defines a part of text in an alternate
voice or mood. The content inside is typically
displayed in italic.
• The <i> tag is often used to indicate a technical
term, a phrase from another language, a thought, a
ship name, etc.
•
</U>
The content inside the <u> is typically displayed
with an underline.
CODE
<P> 1. <p> content </p>
•
</P>
The <p> tag defines a paragraph.
• Browsers automatically add a single blank line
before and after each <p> element.
<OL> 1. <ol>
2. <li> Coffee </li>
3. <li> Tea </li>
</OL>
4. <li> Milk </li>
5. </ol>
<UL> 1. <ul>
2. <li> Coffee </li>
</UL>
3. <li> Tea </li>
4. <li> Milk </li>
5. </ul>
• The <ul> tag defines an UNORDERED LIST. An
ordered list can be numerical or alphabetical.
• The <li> tag is used to define each LIST ITEM.
• Images are not technically inserted into a web page; images are
linked to web pages. The <img> tag creates a holding space for
the referenced image.
• The <img> tag has two required attributes:
• src - Specifies the path to the image
• alt - Specifies an alternate text for the image, if the image for
some reason cannot be displayed
CODE
<VIDEO> 1. <video width="320" height="240" controls>
</VIDEO>
2. <source src="movie.mp4" type="video/mp4">
3. <source src="movie.ogg" type="video/ogg">
4. </video>
<AUDIO> 1.
2.
<audio controls>
<source src="horse.ogg« type="audio/ogg">
</AUDIO>
3. <source src="horse.mp3" type="audio/mpeg">
4. </audio>
</TABLE>
2. <tr>
3. <th> content </th>
4. </tr>
5. <tr>
• The <table> tag defines an HTML table. 6. <td> content </td>
7. </tr>
• Each table row is defined with a <tr> tag. 8. </table>
• Each table header is defined with a <th> tag.
• Each table data/cell is defined with a <td> tag.
</TH>
2. <tr>
3. <th> content </th>
4. </tr>
5. <tr>
• The <th> tag defines a header cell in an HTML 6. <td> content </td>
table.
7. </tr>
• An HTML table has two kinds of cells: 8. </table>
• Header cells - contains header information
(created with the <th> element)
<TD> 1.
2.
<table border="1">
<tr>
</TD>
3. <th> content </th>
4. </tr>
5. <tr>
• The <td> tag defines a standard data cell in an
6. <td> content </td>
HTML table. 7. </tr>
• The text in <td> elements are regular and left- 8. </table>
aligned by default.
CODE
<MARQUEE> 1. <marquee direction = "up"> content
</marquee>
</MARQUEE>
• The HTML <marquee> tag is used for scrolling
piece of text or image displayed either
horizontally across or vertically down your web
site page depending on the settings.
•
-->
The comment tag is used to insert comments in
the source code. Comments are not displayed
in the browsers.
CODE
<INPUT TYPE=“TEXT”> 1. <input type = ”text”>
• refers to the tag that is used add a textbox in the
web page
CASCADING
STYLE
SHEET
Cascading
Style-sheet
•CSS stands for Cascading Style Sheets
•CSS describes how HTML elements are to be displayed on screen, paper, or in other media
•CSS saves a lot of work. It can control the layout of multiple web pages all at once
•External stylesheets are stored in CSS files
CSS Syntax
1. <!DOCTYPE html>
2. <html>
3. <head>
4. <title> Title of the document </title>
5. <style>
6. font{ color: red;}
7. </style>
8. </head>
9. <body>
10.<font>content</font>
Applying CSS: External styles are used for the whole, multiple-
page website. There is a separate CSS file,
file.html file.css
1. <!DOCTYPE html>
1. p {
2. <html>
2. color: red;
3. <head>
3. text-align: center;
4. <title> Title of the document </title>
4. }
5. <link rel="stylesheet" href=“file.css">
6. </head>
7. <body>
8. <p>Hello World!</p>
9. <p>These paragraphs are styled with CSS.</p>
10. </body>
11. </html>
MARGINS, BORDER, AND PADDING