TVL Comprog11 Q1 M5
TVL Comprog11 Q1 M5
Vocational
Livelihood
QUARTER
Computer Programming
Republic Act 8293, section 176 states that: No copyright shall subsist in
any work of the Government of the Philippines. However, prior approval of the
government agency or office wherein the work is created shall be necessary for
exploitation of such work for profit. Such agency or office may, among other things,
impose as a condition the payment of royalties.
QUARTER 1
Introductory Message
Welcome to the Computer Programming for the ICT Module on HTML5 Syntax and
Links!
This module was collaboratively designed, developed and reviewed by educators from
Schools Division Office of Pasig City headed by its Officer-In-Charge Schools Division
Superintendent, Ma. Evalou Concepcion A. Agustin in partnership with the Local
Government of Pasig through its mayor, Honorable Victor Ma. Regis N. Sotto.
The writers utilized the standards set by the K to 12 Curriculum using the Most
Essential Learning Competencies (MELC) while overcoming their personal, social,
and economic constraints in schooling.
This learning material hopes to engage the learners into guided and independent
learning activities at their own pace and time. Further, this also aims to help learners
acquire the needed 21st century skills especially the 5 Cs namely: Communication,
Collaboration, Creativity, Critical Thinking and Character while taking into
consideration their needs and circumstances.
In addition to the material in the main text, you will also see this box in the body of
the module:
As a facilitator you are expected to orient the learners on how to use this module.
You also need to keep track of the learners' progress while allowing them to manage
their own learning. Moreover, you are expected to encourage and assist the learners
as they do the tasks included in the module.
For the learner:
Welcome to the Computer Programming for the ICT Module on HTML5 Syntax and
Links!
The hand is one of the most symbolized part of the human body. It is often used to
depict skill, action and purpose. Through our hands we may learn, create and
accomplish. Hence, the hand in this learning resource signifies that you as a learner
is capable and empowered to successfully achieve the relevant competencies and
skills at your own pace and time. Your academic success lies in your own hands!
This module was designed to provide you with fun and meaningful opportunities for
guided and independent learning at your own pace and time. You will be enabled to
process the contents of the learning material while being an active learner.
Lesson- This section will discuss the topic for this module.
Posttest - This will measure how much you have learned from
the entire module. Ito po ang parts ng module.
EXPECTATIONS
1. define syntax;
2. understand the importance of using the correct syntax;
2. identify what is a link
3. differentiate link and hyperlink; and
4. utilize links in hmtl document.
PRETEST
2. Which of these errors occur when there is a mistake in the spelling of your
command or function?
A. Bug B. Logical error C. Syntax error D. Semantic error
3. All of these are features supported by HTML5 except for one, which is it?
A. Uppercase tag names.
B. Attribute values are optional.
C. Quotes are a must for attributes.
D. Closing empty elements are optional.
5. This is a link that takes you from one domain to another via references called
anchor texts.
A. Cross Link B. Hyperlink C. Internal link D. External Link
RECAP
We have learned that there should be a proper procedure that a program
should follow in order for it to function properly. In flowchart we have learned that
there is a procedure and proper structure that we follow; a step-by-step process that
we must understand to solve a task.
LESSON
Syntax
In programming, syntax refers to the rules that specify the correct combined
sequence of symbols that can be used to form a correctly structured program using
a given programming language. Programmers communicate with computers through
the correctly structured syntax, semantics and grammar of a programming language.
A syntax contains strings similar to words, much like a human language. Correctly
formed syntax strings produce syntactically correct sentences within a specified
programming language.
1. Syntax errors: errors due to the fact that the syntax of the language is not
respected. Meaning you misspelled a command or used a function incorrectly,
sometimes this is caused by sloppy typing. These errors are usually called
crashes.
function getPassword(){
var correct "HTML5";
var guess = ";
while (guess != correct){
guess = prompt("Password?");
} // end while
alert("You may proceed");
} // end getPassword
Figure 1: https://www.dummies.com/web-design-development/javascript/how-to-resolve-javascript-syntax-errors-for-html5-and-css3-programming/
2. Logical errors: errors due to the fact that the specification is not respected.
Normally called bugs, these errors are nearly impossible to solve just by
looking at the codes. Worse, when you run the program in your browser, it
won’t report an error. It won’t work correctly, but the code is all technically
correct. Rather than telling it to do something illegal (which would result in a
syntax error), this code has told the program to do something that’s completely
legal but not logical.
HTML5 Syntax
In HTML5, the syntax is not too different from its predecessors. However, the
difference is that HTML5 offers more flexibility and interoperability, and enables more
interactive and exciting websites and applications.
HTML 5 introduces a whole set of new elements that make it much easier to
structure pages.
HTML5 comes with a lot of flexibility and it supports the following features −
<!DOCTYPE html>
Character Encoding
HTML 5 removes extra information required and you can use simply following
syntax:
HTML 5 removes extra information required and you can simply use the
following syntax:
Link
A link is nothing but a chain that connects pages within websites and without
links there’s no website. A link, or an anchor, is a word, a group of words or an image
you can click to jump to another document or a specific part of the current document.
The element for links, both internal and external are as simple as <a> (an
abbreviation of anchor). But you cannot just use <a> - you have to add at least one
attribute – the href. Href stand for hypertext reference and the value defines the
address you are linking to. The simplest link looks like this:
Sometimes you want the user to keep having your webpage open and you have
the possibility of determining whether or not a link should open in a new window. To
do this, you use the target-attribute.
If you want to link to a specific part of your document, this can be done in two
ways. Previously, it was done by identifying the place you wanted to link to that
would look like this:
The # indicates that it is a fragment identifier link and the question-2 tells the
browser which fragment to look for.
As you can see, we use the anchor-element if there is no unique id and then
close the element in the first tag, as the closing tag is not needed.
Both the terms links and hyperlinks are intertwined and often used
interchangeably, but in a different context. A link when used within a web page is
called a hyperlink. The purpose of both controls is same, except hyperlink control is
an HTML control that provides direct access to the target website when clicked or
hovered upon, whereas a link control is a server control that takes requests to the
server first when clicked, before redirecting access to the target website. In simple
terms, a link can be referred to simply as a web address whereas a hyperlink is a
link that cross link pages within the same or different websites in the context of the
World Wide Web.
The H in HTML stands for hypertext, which is a fancy term for links, which
give life to the web pages you build. It’s very easy to add a link — or even two — to a
web page, as in this screen shot:
Figure 2: https://www.dummies.com/web-design-development/site-development/how-to-include-links-in-your-html5-web-page/
The code for this page, including the links, is reproduced here:
<!DOCTYPE HTML>
<html lang = "en">
<head>
<title>linkDemo.html</title>
<meta charset = "UTF-8" />
</head>
<body>
<h1>Link Demo</h1>
<h2>Relative reference to an image</h2>
<p>
This paragraph has a link to a
<a href = "monkey.png">monkey picture.</a>
</p>
<h2>Absolute reference to a web page</h2>
<p>
This paragraph contains a link to
<a href = "http://www.aharrisbooks.net">
Andy's main site.
</a>
</p>
</body>
</html>
Links are more than words on a screen. When the user clicks the text, the
browser loads a different page on the Internet.
Links are usually embedded directly into your page. Links cannot stand on their
own, but are usually part of some other block-level element like a paragraph.
3. Use the href attribute to describe where the link will go.
Most links have an href (hypertext reference) attribute, which describes what
page should load when the user clicks the link. The href can be a relative or absolute
address:
o Relative: The href can be a simple filename, and if you’re linking to a file in
the same directory as the web page you’re writing, you can simply indicate the
filename. This is s a relative reference because the browser assumes the linked
file is in the current directory of the current server.
o Absolute: The href can also be a complete web address, which is called
an absolute reference because it explains how to find the file regardless of the
location of the current page. To point to pages or files on somebody else’s
server, you must use absolute references.
4. Place the visible text between the <a> and </a> tags.
Any text between these tags is displayed on the screen in a format that
indicates a link. The default format is blue underlined text.
ACTIVITIES
Create a simple html file about yourself using any programming software
available or by using notepad. Make sure that it is error-free. Be creative and include
links.
Submit a soft copy of your completed activity to your subject teachers on the
following meeting.
This guide serves as basis for scoring, in-line with simple html file activitiy.
Needs work Developing Meets Standard Score
Information is not Some of Information is
always clear or information is always clear or
Content correct. clear and correct. correct.
10 points 15 points 20
Total /50
WRAP–UP
In not less than five (5) sentences, write your takeaways from the lesson
discussed that you think would be important for you to remember in
doing / developing programs.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
VALUING
Directions: Read the questions carefully. Write your answers on the space
provided. Use a separate sheet if needed.
POSTTEST
Directions: Identify what is being asked by the statements below. Write your
answer on the space provided.
_____________ 2. Known as logical errors, these are codes that does not work correctly
but are technically correct.
href 5.
Absolute reference 4.
HTML5 3.
Bugs 2.
Crashes 1.
Post-test:
5. B
4. A
3. C
2. C
1. B
Pre-test:
References
“How to Resolve JavaScript Logic Errors for HTML5 and CSS3 Programming’.
Accessed June 25, 2020, 2:10:44PM https://www.dummies.com/web-design-
development/javascript/how-to-resolve-javascript-logic-errors-for-html5-and-
css3-programming/
“What is the difference between link and hyperlink?”. Pathak, Web Developer and
Designer at Quickensol IT Solutions Accessed June 30, 2020, 11:15:09AM
https://www.quora.com/What-is-the-difference-between-link-and-hyperlink,
Pradeep
“Links”. Accessed June 30, 2020, 11:56:17AM https://html5-tutorial.net/html-
basics/links/
Photo Credit: