Wek 1-8 Web System and Technologies
Wek 1-8 Web System and Technologies
Week 1- 8
What is XHTML?
• XHTML stands for EXtensible HyperText Markup Language
• XHTML is a stricter, more XML-based version of HTML
• XHTML is HTML defined as an XML application
• XHTML is supported by all major browsers
Why XHTML?
XML is a markup language where all documents must be marked up correctly
(be "well-formed").
XHTML was developed to make HTML more extensible and flexible to work with
other data formats (such as XML). In addition, browsers ignore errors in HTML
pages, and try to display the website even if it has some errors in the markup.
So XHTML comes with a much stricter error handling.
The Most Important Differences from HTML
• <!DOCTYPE> is mandatory
• The xmlns attribute in <html> is mandatory
• <html>, <head>, <title>, and <body> are mandatory
• Elements must always be properly nested
• Elements must always be closed
• Elements must always be in lowercase
• Attribute names must always be in lowercase
• Attribute values must always be quoted
• Attribute minimization is forbidden
XHTML - <!DOCTYPE ....> Is Mandatory
An XHTML document must have an XHTML <!DOCTYPE> declaration.
The <html>, <head>, <title>, and <body> elements must also be present, and the
xmlns attribute in <html> must specify the xml namespace for the document.
HTML Editors
Code Editors allow you to type code for your HTML page.
Notepad/Simpletext. Notepad is included with all version of Microsoft
Windows. Simpletext is included in Mac OS X. Both will allow you to
type a web pages .However, neither offers code highlighting or code
syntax.
Gedit.Gedit is included with most modern distribution of Linux .It
offers code Highlighting but not code hints.
Programmers Notepad. Programmers Notepad is a free program
available from www.pnotepad.org. It offers code highlighting in color
for nearly every programming language, and some code hints
.Additionally it offers a tab system to allow you to work on several
documents at the same time.
Taco HTML. Despite its odd name Taco HTML is a fully featured editor
for the MAC OS X .Is offers code completion ,syntax highlighting and
multiple tabs. Unfortunately it is not free.
Visit www.tacosw.com to download the 30 day trial.
HTML Versiion
HTML 1.0( first draft)-1992
HTML 2.0(proposed standard)- September 1995
HTML 3.2 january 1997
added tables applets……
HTML 4.0 –December 1997
improved tables,forms,….
HTML 4.01- December 1999
slightly different from 4.0
XHTML 1.0 January 2000
Reformulation of HTML 4.01 AS AN XML application
Stricter and cleaner syntax formatting moved to CSS
XHTML 1.1 May 2001
“Modularization of XHTML”
HTML 5
Merges HTML and XHTML features
The new standard has deprecated several tags and introduced several new tags and
design elements.
Exercise 1: True or False
Student name: Course/Yr/Major:
Write true if the statement is correct and false, if the statement is wrong
1. In declaring a code in HTML 5 we must have “ <DOCTYPE>” in the beginning.
2. The first definition of PHP is personal homepage
3. HTML is a programming language
4. ASP stands for Active Server Pages
5. HTML lets your format text, add graphics sound video and save it all in a Text
only or ASCI file that any computer can read
6. Hypertext is the technology that allows for links on the web on every web
page visit.
7. Microsoft Expression Web is inferior to adobe Dreamweaver
8. TACO HTML is use in Windows and MAC OS
9. Notepad and TACO HTML is free to use
10.Meaning of HTML is Hypertext Markup Language.
Reference:
• https://www.w3schools.com/html/html_xhtml.asp
• https://html.com/tags/doctype/#:~:text=The%20<!,be%20compliant%20wi
th%20HTML%20standards.
Lesson II
W3C ORGANIZATION and HTML Rules
OBJECTIVES:
The students should be able to:
1. Define what is W3C Organization
2. Show awareness about the rules in making a website design.
3. Know different recommendations in creating a website design.
W3C ORGANIZATION
The World Wide Web Consortium (W3C) is an international community
where Member organizations, a full-time staff, and the public work together to
develop Web standards. Led by Web inventor and Director Tim Berners-Lee and
CEO Jeffrey Jaffe, W3C's mission is to lead the Web to its full potential
Some users turn –off image loading even if their software can display images
(especially if they are using a modem or have a slow connection)
10.Don’t abandon your web pages
People turn to the WWW for current information .Don’t think of producing
a web page as a one time task but an ongoing project.
However there are parts of your page that are static files (like the biography
of Rizal) no updating is probably needed. But for documents that are time –
sensitive-update!
Exercise 2
Student name: Course/Yr/Major:
Objectives
After this the students should be able to:
1. Create a simple webpage
2. Use more tags and elements to fine tuned their web page
(a ) Sequence
To be useful, the individual units in a grid must share a highly uniform structure of
topics and subtopics. The topics often have no particular hierarchy of importance.
For example, “tuberculosis” is not more or less important a diagnosis than “hilar
adenopathy”, but ideally both case descriptions would share a uniform structure of
subtopics. Thus the user, could follow the grid “down”, reading about tuberculosis,
or cut “across” the grid perhaps b comparing the ‘diagnostic imaging” sections of
both hilar adenopathy and tuberculosis.
Unfortunately, grids can be difficult to understand unless the user recognizes the
interrelationships between categories of information, and so are probably best for
experienced audiences who already have a basic understanding of the topic and its
organization. Graphic overview maps are very useful in grid-like Website.
C
Hierarchical
Information hierarchies are one of the best ways to organize complex bodies of
information. Hierarchical organization schemes are particularly well suited to
Websites, because web sites should always be organized as an outcome of a single
home page. most users are familiar with hierarchical diagrams, and find the
metaphor easy to understand as navigational aid. A hierarchical organization also
imposes a useful discipline in your won analytical approach to your content, as
hierarchies only work well when you have thoroughly organized your material.
Since hierarchical diagrams are so familiar in corporate and institutional life, users
find it easy to build mental models of the site.
Web
Web -like organizational structure poses few restrictions on the pattern of
information use. The goal is to duplicate associative though and fee flow of ideas,
where users follow their interest in a pattern unique to each person who visits the
site. This organizational pattern develops in a web site with very dense links both
to other information within the site, and information on other world wide web site.
The goal is to fully take advantage with the web’s power of linkage and association,
but web-like organization structures can just as easily propagate confusion about
the interrelationships of your information chunks. Ironically, organizational webs
re often the most impractical structure for web site, because they are so hard for
the user to understand and predict.
Webs work best for small sites dominated by list of links, aimed at highly deducted
or experienced users looking for further education or enrichment, not for a basic
understanding of your topic.
Site Elements
Web site can vary enormously in their style, content, organization, and purpose,
but all web sites that are primarily designed to act as information resources share
some basic characteristics.
1. Home page
All web sites are organized around a “home page” that acts as a point of entry
into the complex web pages in a site. In hierarchical organizations, home
page sits at the tope of the chart, and all pages in Web site should contain a
direct link back to the home pages.
4. Updates
Many web sites must be frequently updated so the information doesn’t get
stale. But the presence of the new information may not be obvious to
readers on a web site unless there is a systematic effort to let them know
about it. If items listed on the menus on you home page are updated you
coul just put a “NEW” graphic next to each updated item. You should also
date everyone your web pages, and update that as information changes so
that users can be sure that they have the lates version of things.
Site covers
Site covers can serval a number of different purposes. Some function as “
Splash” screens that offer little information, but are intended to attract users
into a site by using colorful graphics or effects. Others are used to establish
an overall “look-and-feel” for a site. Such covers often provide links to the
major section of the site, allowing visitors quick access to topics of interest
while providing a general site overview. Other covers have few graphics, but
provide detailed information and access to the content of the site.
1. Information
An information site, such as academic, corporate, or general interest site,
should have a cover that establishes an overall visual design theme for
the site. It should also identify and give a brief explanation of the purpose
of the site, and provide a site overview by presenting links to its major
sections.
2. Reference
Example: yahoo.com
A site that will b e used as reference should have its menu posted right
on the front door. Visitors should be able to tell at a glance if the
information they are seeing is inside, and if so, exactly where to find. A
cover to a reference site should look more like a table of contents, with
links to every page in the site. This type of cover can have graphic
elements, but their role is secondary to a site identity that is maintained
throughout all pages.
SGML
Standard Generalized Markup Language (SGML) is a system for
defining markup Languages. Authors mark up their documents by
representing structural, Presentational and semantic information
alongside content.HTML is one example of a markup languages.Here
is an example of an HTML document:
<DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
“http :// www.w3.org/TR/ html4/ strict.dtd”>
<HTML>
<HEAD>
<TITLE> My first HTML document</TITLE>
</HEAD>
<BODY>
<P>Hello World!
</BODY>
</HTML>
Each markup Languages defined in SGML is called an SGML application
.an SGML application is generally characterized by:
1. An SGML declaration .The SGML declaration specifies which characters and
delimiters may appear in the application
2. A document type definition (DTD). The DTD defines the syntax of markup
constructs.The DTD may include additional definitions susch as character
entity references.
3. A specification that describe the semantic to be ascribed to the mark up.This
specification also imposes syntax restriction that cannot be expressed within
the DTD.
4. Document instances containing data (content) and markup. Each instance
contains a reference to the DTD to be used to interpret it.
Each element type declaration generally describes three parts: a start tag,
content and an end tag.
The elements name appears in the start tag (written <element-name>) and
the end tag (written </element-name>); note the slash before the elements
name in he end tag. for example the start and end tags of the UL element
type delimits the item in a list:
<UL>
<LI><P>…list item 1…
<LI><P>…list item 2…
</UL>
Some HTML element types allow authors to limit end tags (e.g., the P and LI
elements types). a few elements types also allow the start tags to be omitted;
for example,HEAD AND BODY .the start and end tags of the UL elements ype
delimit the items in a list:
Some HTML element types have no content .For example the line break element
BR has no content; its only role is to terminate type definition and the text of the
specification indicate whether an element type is empty (has no content)or if it can
have content ,what is considered legal content.
Element names are always case –insensitive.
Please consult the SGML standard for information about rules governing
elements(e.g., they must be properly nested an end tag closes back to the matching
start tag,all unclosed intervning start tags with omitted end tags
(section7.5.1),etc.).
For example ,the following paragraph:
<P> This is the first paragraph.
…a block element…
may be rewritten without its end tag;
<P> This is the first paragraph.
. . . a block element . . .
since the <p> starttag is closed by the following block element. Similarly, if a
paragraph is enclosed by a block element,as in:
<DIV>
<P> This is the paragraph.
</DICV>
The end tag of the enclosing block element(here ,</DIV>)implies the end tag pf the
open <P>start tag.
Elements are not tags.Some people refer to elements as tags(e.g.,”the P tag”).
Rememberthat the elements is one thing and the tag (be it start or end tag) is
another. for instance the HEAD element is always present even though both start
and end HEAD gas may be missing in the markup.
2. Attributes
Elements may have associated properties called attributs which may have
values (by default or set by authos or scripts). Attributs /value pairs appear
befor the final “>” of an element start tag. any number of (legal) attribute
value pairs separted by sapces may appear in an eloement start tag. They
may appear in nay order .
Example:
<H1 id=”section1”>
Thiss is an identified heading thanks to the is attribute
</H1>
By default , SGML requires that all attributes values be delimited using either
double quotation marks (ASCII decimal 34) or single quotation marks ( ASCII
decimal 39).singlr quate marks can bee included within the attribute value
when the value is delimited by double quate marks,and vice versa. Authors
may also use numeric character references to represent double quates
(") and single quates (').For double quates double authors can also
use the character entity reference ".
In certain cases authors may specify the value of an attribute without any
quattaion marks.The attribute value may only contain letter(a-z and A-
Z).digits (0-9) hyphens (ASCII decimal 45), periods (ASCII decimal 46),
underscores (ASCII decimal 95) and colons (ASCII decimal 58)we recommend
using quotation marks even when it is possible to eliminate them.
Essentially there are two ways to write HTML., with a “ What You see is what
you Get”(WYSIWYG) editor or with a text editor .
Speed: Unless you have been writing HTML for several years ,most
WYSIWYG editors will help you create web pages Faster.
HTML Validation. If you use a WYSIWYG editor, you can be sure that your
HTML will work in most browsers and usually be accurate HTML (with some
notable exceptions).
Portability. If you do HTML on a text editor you can make changes anywhere
that you can get access to your pages.Most text editors are fairly similar
across platforms, and if you use Notepad that is availabale on all Windows
machines.
Clean HTML. Many HTML editors add storage codes tags,and attributes into
the HTML. These can slow down the download of the page by adding
extraneous characters create pages that are only viewable by one browser
and add in unnecessary tags. By writing HTML in a text editor you ensure that
you only use HTML in a text editor,you ensure that you only use HTML tags
that you intend to use.
PARAGRAPH FORMATTING
INLINE ELEMENTS
• <b>…</b> or <strong>…</strong> - Causes the browser to render the
enclosed text in bold type.
Example:
<b> This text is bold.</b>
• <big>…</big> - Causes the browser to render the enclosed text in larger
type.
Example:
<big> This text is big.</big>
• <i>…</i> or <em>…</em> - Causes the browser to render the enclosed text
in italic type.
Example:
<i>This text is italic.</i>
• <s>…</s> or <strike>…</strike> - Causes the enclosed text to be rendered
with a strikethrough style.
Example
My best friend is <s>John</s> Paul.
• <small>…</small> - causes the browser to render the enclosed text in
smaller type.
Example:
<small>This text is small.</small>
• <tt>…</tt> - causes the browser to render the enclosed text in a monospace
font.
Example:
<tt> This text is monospaced.</tt>
• <u>…</u> - Marks the enclosed text to be rendered as underlined text.
Example
This <u>word</u> is underlined.
• <var>…</var> - Marks the enclosed text as a variable or program argument.
Typically rendered in italics by browsers.
Example:
The variable <var>x</var> is used here.
• <samp>…</samp> - Marks the enclosed text as sample output, such as from
a computer program. Typically rendered as monospaced text by browsers.
Example:
<p>When an undefined element is used in an HTML, document, a validator
will five an error like the following:</p>
<p>
<samp> NSFMLSU.EXE:test.html:4:7:E: element “FOOBAR” undefined
</samp>
</p>
• <kbd>…</kbd> - marks the enclosed text as text to be entered by the user.
Typically rendered as monospaced text by browsers.
Example:
To proceed,enter<kbd> Yes</kbd> at the prompt.
• <dfn>…</dfn>-marks the defining instance of the enclosed term. Typically
rendered italics by browsers.
Example:
<dfin>Ichthyology</dfn>is the study of fish.
• <code>…</code> - marks the enclosed text as computer code. Typically
rendered as monospaced text by browsers.
Example:
<pre><code>
Class HelloWorld {
Public static void main (String [] args){
System.out.println(“Hello World!”);
}
}</code></pre>
• <cite>…</cite> - marks the enclosed text as a citation (such as a book
title).Typically rendered by browsers in italics.
Example:
I recently read <cite> The Grapes of Wrath </cite>
• <acronym>…</acronym> - Marks the text within the tag an acronym. When
used with the title attribute, acronym allow browsers to display the
acronym’s expansion as a tooltip.
Example:
<acronym title = HyperText Markup Language”> HTML </acronym>
• <abbr>… </abbr> - Marks the text within the tag as an abbreviation. When
used with the title attribute, abbr is useful for aural (text- to – speech)
browsers, spell checkers, translator and other software.
Example:
<abbr title = United Nations”> UN</abbr>
• <br/> - forces a line break in the current line
Example:
This line has<br/> a forced break.
• <font>…</font> -Specifies font face, size, and/or color for enclosed text.
<font face = “Verdana,Arial” size “+1” color=”red”>
We recomment using styles instead.
</font>
• <q>…</q> - Marks the enclosed text as brief quotation.
Example:
<p> She said, <q>I was here yesterday.</q></p>
• <span>…</span> - the span element is a generic inline container. It is
typically used to group inline elements together for the purpose of applying
a style to them as a group.
Example:
<p>How do you put <span style = “border:thin solid”> words in a box
</span>?</p>
• <sub>…</sub> - marks the enclosed text as a subscript. Subscripts are
generally rendered with lowered baseline and in a smaller font than ordinary
text.
Example:
H<sub>2</sub>0 is water.
• <sup>…</sup> - Marks the enclosed text as superscript. Superscripts are
generally rendered with a raised baseline and in a smaller font than ordinary
text.
E=mc<sup>2</sup>, according to Einstein.
Note: You can use notepad as your text editor and use browser to see your
output.
Reference:
✓ https://www.geeksforgeeks.org/tags-vs-elements-vs-attributes-in-html/
✓ https://www.w3schools.com/html/html_elements.asp
Lesson IV:
Working with HTML and CSS
Objectives:
After this lesson the students should be able to:
1. Use CSS codes to immediately design their HTML output
2. Identify which tags to consider as their specifier when designing an HTML
page.
3. Construct a webpage using HTML and CSS
What is CSS?
• 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
HTML was NEVER intended to contain tags for formatting a web page!
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
When tags like <font>, and color attributes were added to the HTML 3.2
specification, it started a nightmare for web developers. Development of large
websites, where fonts and color information were added to every single page,
became a long and expensive process.
To solve this problem, the World Wide Web Consortium (W3C) created CSS.
CSS Syntax
A CSS rule-set consists of a selector and a declaration block:
Each declaration includes a CSS property name and a value, separated by a colon.
Multiple CSS declarations are separated with semicolons, and declaration blocks
are surrounded by curly braces.
CSS Selectors
CSS selectors are used to "find" (or select) the HTML elements you want to style.
We can divide CSS selectors into five categories:
• Simple selectors (select elements based on name, id, class)
• Combinator selectors (select elements based on a specific relationship
between them)
• Pseudo-class selectors (select elements based on a certain state)
• Pseudo-elements selectors (select and style a part of an element)
• Attribute selectors (select elements based on an attribute or attribute value)
• This page will explain the most basic CSS selectors.
CSS id Selector
The id of an element is unique within a page, so the id selector is used to select one
unique element!
To select an element with a specific id, write a hash (#) character, followed by the
id of the element.
Note: an id cannot start with a number
The universal selector (*) selects all HTML elements on the page.
CSS Grouping Selector
The grouping selector selects all the HTML elements with the same style
definitions.
Look at the following CSS code (the h1, h2, and p elements have the same style
definitions):
Exercise 4.
Student name: Course/Yr/Major:
Subject Teacher: Subject schedule:
Date submitted: Section:
HTML Tables
Each table row is defined with a <tr> tag. Each table header is defined with
a <th> tag. Each table data/cell is defined with a <td> tag.
Note: The <td> elements are the data containers of the table.
They can contain all sorts of HTML elements; text, images, lists, other tables, etc.
CSS Tables
Table Borders
To specify table borders in CSS, use the border property.
The example below specifies a black border for <table>, <th>, and <td> elements:
Full-Width Table
The table above might seem small in some cases. If you need a table that should
span the entire screen (full-width), add width: 100% to the <table> element:
Example code:
<!DOCTYPE html> <th>Contact</th>
<html> <th>Country</th>
<head> </tr>
<style> <tr>
#customers { <td>Alfreds Futterkiste</td>
font-family: Arial, Helvetica, sans- <td>Maria Anders</td>
serif; <td>Germany</td>
border-collapse: collapse; </tr>
width: 100%; <tr>
} <td>Berglunds snabbköp</td>
<td>Christina Berglund</td>
#customers td, #customers th { <td>Sweden</td>
border: 1px solid #ddd; </tr>
padding: 8px; <tr>
} <td>Centro comercial
Moctezuma</td>
#customers tr:nth- <td>Francisco Chang</td>
child(even){background-color: <td>Mexico</td>
#f2f2f2;} </tr>
<tr>
#customers tr:hover {background- <td>Ernst Handel</td>
color: #ddd;} <td>Roland Mendel</td>
<td>Austria</td>
#customers th { </tr>
padding-top: 12px; <tr>
padding-bottom: 12px; <td>Island Trading</td>
text-align: left; <td>Helen Bennett</td>
background-color: #4CAF50; <td>UK</td>
color: white; </tr>
} <tr>
</style> <td>Königlich Essen</td>
</head> <td>Philip Cramer</td>
<body> <td>Germany</td>
</tr>
<table id="customers"> <tr>
<tr> <td>Laughing Bacchus
<th>Company</th> Winecellars</td>
<td>Yoshi Tannamuri</td>
<td>Canada</td>
</tr>
<tr>
<td>Magazzini Alimentari
Riuniti</td>
<td>Giovanni Rovelli</td>
<td>Italy</td>
</tr>
<tr>
<td>North/South</td>
<td>Simon Crowther</td>
<td>UK</td>
</tr>
<tr>
<td>Paris spécialités</td>
<td>Marie Bertrand</td>
<td>France</td>
</tr>
</table>
</body>
</ht
Exercise 5
Construct a web calendar based on their birth month and must highlights the following:
• Birthday
• Sundays
• Holidays References
0
References
✓ https://www.w3schools.com/css/css_table.asp
✓ https://www.w3schools.com/html/html_tables.asp
1
Lesson VI
Working with BOOTSTRAP and JQUERY
Objectives
After this lesson the students should be able to
• Know how to link bootstrap and JQUERY in HTML
• Know how to call classes and ids in bootstrap
• Construct a webpage using alert, buttons, badge, breadcrumbs classes and be with their child
classes using bootstrap
• Know the structures of classes to be called from bootstrap
What is Bootstrap?
Bootstrap is a free front-end framework for faster and easier web development
Bootstrap includes HTML and CSS based design templates for typography, forms, buttons,
tables, navigation, modals, image carousels and many other, as well as optional JavaScript
plugins
Bootstrap also gives you the ability to easily create responsive designs
What is Responsive Web Design?
Responsive web design is about creating
web sites which automatically adjust
themselves to look good on all devices,
from small phones to large desktops.
2
One advantage of using the Bootstrap 4 CDN:
Many users already have downloaded Bootstrap 4 from MaxCDN when visiting another site. As
a result, it will be loaded from cache when they visit your site, which leads to faster loading
time. Also, most CDN's will make sure that once a user requests a file from it, it will be served
from the server closest to them, which also leads to faster loading time.
Downloading Bootstrap 4
If you want to download and host Bootstrap 4 yourself, go to https://getbootstrap.com/, and
follow the instructions there
Create First Web Page With Bootstrap 4
1. Add the HTML5 doctype
Bootstrap 4 uses HTML elements and CSS properties that require the HTML5 doctype.
Always include the HTML5 doctype at the beginning of the page, along with the lang attribute
and the correct character set:
!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
</html>
3
2. Bootstrap 4 is mobile-first
Bootstrap 4 is designed to be responsive to mobile devices. Mobile-first styles are part of the
core framework.
To ensure proper rendering and touch zooming, add the following <meta> tag inside
the <head> element:
The width=device-width part sets the width of the page to follow the screen-width of the
device (which will vary depending on the device).
The initial-scale=1 part sets the initial zoom level when the page is first loaded by the browser.
3. Containers
The
following example shows the code for a basic Bootstrap 4 page (with a full width container):
4
The following example shows the code for a basic Bootstrap 4 page (with a
responsive fixed width container):
5
Exercises 6
6
References:
✓ https://www.smashingmagazine.com/2009/03/breadcrumbs-in-web-design-examples-
and-best-practices/
✓ https://www.w3schools.com/bootstrap4/bootstrap_get_started.asp