TVL Comprog11 Q1 M13
TVL Comprog11 Q1 M13
Programming
(ICT)
QUARTER 1
MODULE
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.
Welcome to the Computer Programming for the ICT Module on CSS Border and
Margin
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.
Computer
Programming
QUARTER 1
MODULE
Welcome to the Computer Programming for the ICT Module on CSS Border and
Margin
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.
Post-test - This will measure how much you have learned from
the entire module. Ito po ang parts ng module.
EXPECTATION
PRE–TEST
1. It is a CSS property that allows you to specify the style, width and color of an
element border?
A. CSS Margin B. CSS Border C. CSS Style D. CSS Color
2. Which of the following is the Border property that modify the width of the four
borders?
A. Border Width B. Border Size C. Border Color D. Border frame
3. Which of the CSS properties are used to create space around elements, outside
of any defined border?
A. CSS Margin B. CSS Border C. CSS Style D. CSS Color
4. Which of the following CSS Border property, specifies each of the borders
like top, right, bottom, and left?
A. Border Width B. Border size
C. Border Shorten property D. Border Individual side
5. Which of the following CSS Margin property that can specify the margin for
each side of an element?
A. Margin- Shorthand B. Margin-Right
C. Margin-Top D. Margin-Individual sides
RECAP
Last discussion you enjoyed how to style your webpage. We notice the
power of CSS on how our webpage make it more presentable and interesting. We
learned in CSS that we have syntax to follow in giving style in our website such as
background color, text color, text size, text style and text alignment.
The lists below are the following property can be used to add or change a
style for a webpage, in one to sentence define the use of each property.
LESSON
The CSS border properties allow you to specify the style, width, and color of an
element's border.
Border Style
• inset - Defines a 3D inset border. The effect depends on the border-color value
The border-style property can have from one to four values (for the top border, right
border, bottom border, and the left border.
Figure 1
Figure 2
Border Width
• The width can be set as a specific size (in px, pt, cm, em, etc) or by using
one of the three pre-defined values: thin, medium, or thick.
• The border-width property can have from one to four values (for the top
border, right border, bottom border, and the left border).
Figure 3
Border Color
• The border-color property is used to set the color of the four borders.
• transparent
• The border-color property can have from one to four values (for the top
border, right border, bottom border, and the left border).
Figure 5
In CSS, there are also properties for specifying each of the borders (top, right,
bottom, and left):
p{
border-top-style: dotted;
border-right-style: solid;
border-bottom-style: dotted;
border-left-style: solid;}
Figure
Figure 6
• For the previous examples, there are many properties to consider when
dealing with borders.
• To shorten the code, it is also possible to specify all the individual border
properties in one property.
• border-width
• border-style (required)
• border-color
p{
Figure 7
Rounded Borders
Figure 8
Figure 9
CSS Margin
• The CSS margin properties are used to create space around elements,
outside of any defined borders.
• With CSS, you have full control over the margins. There are properties for
setting the margin for each side of an element (top, right, bottom, and left).
CSS has properties for specifying the margin for each side of an element:
• margin-top
• margin-right
• margin-bottom
• margin-left
• auto - the browser calculates the margin. You can set the margin property
to auto to horizontally center the element within its container.
• The element will then take up the specified width, and the remaining space
will be split equally between the left and right margins:
div {
width: 300px;
margin: auto;
border: 1px solid red;
}
Figure 10
• length - specifies a margin in px, pt, cm, etc.
div {
margin-top: 100px;
margin-bottom: 100px;
margin-right: 150px;
margin-left: 80px;
• inherit - specifies that the margin should be inherited from the parent
element. This example lets the left margin of the <p class="ex1"> element be
inherited from the parent element (<div>):
div {
border: 1px solid red;
margin-left: 100px;
}
p.ex1 {
margin-left: inherit;
}
Figure 11
• To shorten the code, it is possible to specify all the margin properties in one
property.
• margin-top
• margin-right
• margin-bottom
• margin-left
div {
background-color: lightblue;}
• margin: 25px;
ACTIVITIES
Create a simple Webpage with the “Title My Favorite Quotes” and by using
CSS Border and Margin. Make the webpage more interesting. Follow the
instructions below.
1. Create a simple webpage with a heading 1 “My Favorite Quotes”. You need to
choose your 5 favorite quote and put it in each border.
2. As the background color of the whole webpage use the color Salmon, for font
family set Papyrus and for font size use 20 px.
3. For Border you need to set the dotted, dashed, double, ridge and mix border
style.
4. For the Margin set the top margin to 25 px, right 50 px, bottom 75 px and left
margin is 100px
5. Set all the quotes to center alignment and for background color of each border
set it to any color that you want.
Rubrics:
Items Points
1. Heading 1 “My Favorite Quote” 5
and the 5 different Quotes
2. Background color, font family, 5
and font text.
3. Border (dotted, dashed, double, 7
ridge and mix)
4. Margin top 25 px, right 50 px, 7
bottom 75 px and left margin is
100px
5. Alignment and border 6
background color
TOTAL 30 points
*answer the worksheet no. 10
WRAP–UP
The CSS border properties allow you to specify the style, width, and color of
an element's border. Border can be in all sides, red bottom border. rounded border,
blue left border it depends on your liking. While the CSS margin properties are
used to create space around elements, outside of any defined borders. With CSS,
you have full control over the margins. There are properties for setting the margin
for each side of an element like top, right, bottom, and left. In activity below provide
the name of each border style
VALUING
Instruction: Read and answer the following questions carefully in two to three
sentences each number.
8. Which of the following CSS Margin property that can specify to shorten the
code of the individual margin property?
KEY TO CORRECTION
10.B 5. A 5. C 5. Mix
9. C 4. B 4. C 4. Outset
8. A 3. C 3. B 3. Groove
7. D 2. D 2. D 2. Solid
6. A 1. A 1. B 1. Dashed
Post-test: Pre-test: Wrap-up
REFERENCES
Accessed July 21, 2020 10:30 pm, https://www.w3schools.com/
Accessed July 21, 2020 11:00 pm
1st quote https://www.pinterest.ph/pin/210191507594534781/
Accessed July 21, 2020 11:35 pm
2nd quote https://www.pinterest.ph/pin/24277285478904534/
Accessed July 21, 2020 12:45 pm
3rd quote https://www.pinterest.ph/pin/78074128539261793JB1/
Accessed July 21, 2020 1:30 pm
4th quote https://www.pinterest.ph/pin/423760646188858484/
Accessed July 21, 2020 1:40 pm
5th quote https://www.pinterest.ph/pin/584623595359259639/