L2 - Writing Out The Webpage
L2 - Writing Out The Webpage
Heading elements have opening and closing tags to enclose the topic or section title to be used. There
are six levels of headings and all except the first level (i.e., <h1>) can be employed over and over
throughout the HTML document. The first level heading should be your main or umbrella topic, and the
other levels only your subtopics, so that the Web users will not be confused.
The <h4> heading usually displays in the default font size (which is 12pt) and in bold.
Format Tags
• Paragraph
Headings may be used to introduce paragraphs
Use <p> and </p>
What is HTML?
Example blink 182
Example blink 182
You can also use the “ ” command to connect two words that should always be
seen together in the same line, rather than having those two words broken up by a line
break if it reaches the limit of the paragraph length allowed in the browser window
display.
To make sure that “blink” and “182” are not split in the second sentence due to space
constraints of the browser window, you need to type out “blink 182” instead of
simply typing “blink 182”.
Format Tags
• Line Break
Use <br />
<sup> - superscript
<sub> - - subscript
FILO applies to tags as well. Any combination of tags can be used, as long as
you close the innermost tag before closing its enclosing tag.
Tags for Lists
You can also display groups of texts as lists in HTML.
Here are a few tags for lists.
• unordered lists are displayed with solid round bullets. The bullet type can be
changed by using the type attribute.
• ordered lists use Arabic numerals with a value “1” for the first list item. ,”2” for the
second item, and so on. As with unordered lists, the appearance of these numerals
can be changed by changing the type attributes. You can also change the starting
point of an ordered list by adding the start attribute in the initial <ol> tag.
• each item in a list is enclosed in <li> </li> tags.
• Unordered or Bulleted List
<ul>Voltage
<li>100V</li>
<li>110V</li>
<li>115V</li>
<li>120V</li>
<li>220V</li>
<li>230V</li>
<li>240V</li>
</ul>
• Ordered or Numbered List
<ol>Pet hates:
<li>waking up early</li>
<li>drinking hot tea</li>
<li>cleaning my room</li>
<li>the day of doom</li>
</ol>
• Definition List
This kind of list is enclosed in <dl> </dl> tags. The term to be defined is within <dt>
</dt> tags, while the term’s definition is noted inside <dd> </dd> tags
Definition lists are not lists of items.
Nested List
Nested Lists
In HTML, there are two valid types of links, external and internal,
depending on the page your Web browser is trying to access.
HTML Links
• External Link
An external link is a link to a file or to a webpage
that does not belong to the webpage’s own site.
In the browser, the absolute URL or the address itself (in this example,
http://www.gov.ph) will not be displayed; instead, the anchor text
(Republic of the Philippines) will be shown. Clicking on the anchor
text link will transfer you to the URL itself, which in this case is the
official government website of the Republic of the Philippines.
HTML Links
• Internal Link
An internal link is a link to a file or a webpage
within the webpage’s own site, or to any part of
the webpage itself.
<a href=“project.html”>
this links to my project
</a>
Ex. 1
Both the webpage you are editing and the project.html file need to be located in
the same directory or folder, so when someone clicks on the “this links to my
project” hyperlink, the project. html file will be opened.
HTML Links
• Internal Link
An internal link is a link to a file or a webpage
within the webpage’s own site, or to any part of
the webpage itself.
<a href=“pony.gif”>In another window my pony is. See it you must.</a>
Ex. 2
Links can be used to load not only .html files but also any file
type you want, such as image files.
When the user clicks on that link, it will then open the pony.gif
file properly, unless the file is not located in the same directory
as the webpage file itself.
HTML Links
• Internal Link
An internal link is a link to a file or a webpage
within the webpage’s own site, or to any part of
the webpage itself.
<a href=“Images/pony.gif”>
In another window my pony is. See it you must.
</a>
Ex. 3
if pony.gif was placed in a sub-folder called Images, the HTML would be modified.
You may want to organize your folders so that all image files are placed in the same
directory and all .html files are kept in another.
HTML Links
• Link Target: New Window
To make a link, open a page or a file in
a new window, target=“_new” must be
added to the href attribute.
<p>
<a href=“#bottom”>
More on the Yanomami Indians of the Amazon</a>
</p>
• Link Target: New Window
Example
A hyperlink does not always need to be a text. It can actually be anything that
can be clicked on, so even an image can be a link.