WEBAPP Lesson 2
WEBAPP Lesson 2
NG HTML
STRUCTURES
AND
DIFFERENT
IDEs Web Applications
Objectives
Content
HTML
Structure
HTML
Presentation
CSS
Behavior
3
Javascript
What makes up a webpage?
The makeup of a webpage could be viewed as a combination of the following four elements:
• Contents - the collective term for all the browser-displayable information elements such as text, audio, still
images, animation, video, multimedia, and files (e.g., Word, PowerPoint, PDF, etc.) of web pages. Content does
not require any additional presentational markups or styles in order to fully convey its message.
• Structure - refers to the practice of using HTML on content to convey meaning(semantics) and to describe how
blocks of information are structured to one another.
Examples: "this is a list" (ol, ul, li), "this is headings and subheadings" (<h1>, <h2>, ..., <h6>), "this
section is related to" (<a>), etc..
• Presentation - (or Style) refers to anything related to how the content and structure is presented. Examples: size,
color, margins, borders, layout, location, etc.
• Behavior - (or Interactivity) refers to the employment of client-side script (e.g., JavaScript) to create interactivity
between the webpage and its users
4
What is HTML?
It is a markup language
Tags in HTML: Tags are one of the most important part in an HTML Document. HTML uses some
predefined tags which tells the browser about content display property, that is how to display a
particular given content. For Example, to create a paragraph, one must use the paragraph tags(<p>
</p>) and to insert an image one must use the img tags(<img />).
Paired Tags: These tags come in pairs. That is they have both opening(< >) and closing(</ >) tags.
6
Example of HTML tags
Element
tag
name
content
7
Basic HTML document structure
<!DOCTYPE html>
<html>
<head>
*
*
</head>
<body>
*
*
</body>
</html>
8
!Doctype
The declaration is not an HTML tag. It is an "information" to the browser about what document type
to expect.
9
HTML element
The <html> tag is the container for all other HTML elements (except for the <!DOCTYPE> tag).
10
Title element
The <title> tag defines the title of the document. The title must be text-only, and it is shown in the browser's title bar or
in the page's tab.
The contents of a page title is very important for search engine optimization (SEO)! The page title is used by search
engine algorithms to decide the order when listing pages in search results.
The <head> element is a container for metadata (data about data) and is placed between the <html>
tag and the <body> tag.
Metadata typically define the document title, character set, styles, scripts, and other meta
information.
The <body> element contains all the contents of an HTML document, such as headings, paragraphs,
images, hyperlinks, tables, lists, etc.
13
Text Editors
14
Aptana Studio 3
15
Aptana Studio 3
16
Aptana Studio 3
17
Notepad++
18
Netbeans (IDE)
19
Visual Studio Code (IDE)
20
Atom (IDE)
21
Common coding errors
22
How to run a web page stored on
your computer?
• Start your browser, and use the FileOpen or Open File command to open the file. Or, type the
complete path and filename into the address bar, and press Enter.
• Use the file explorer on your system to find the HTML file, and double-click on it.
• If you’re using Aptana, select the HTML file in the App Explorer and click the Run button to open
the file in the most recently used browser. If you’re using another text editor or IDE, look for a
similar button or command.
23
Validator
• Go to the URL that follows, identify the file to be validated, and click the Check button:
• http://validator.w3.org/
24
Sample validator
25