Computer Notes
Computer Notes
Introduction to CSS:
CSS
Cascading Style Sheets
A language used to define format and layout of web content
Contains presentational information
Contains styles that are saved on a separate file (.CSS file)
Advantages:
Can produce a variety of text effects
Designs layout and appearance of graphics
Adds dynamic actions
Disadvantages:
Can only format tags defined on the page
Some browsers do not support CSS
Very limited application for simple text browser
Applications of CSS:
Web Design: Enhances the visual appeal of websites.
Responsive Design: Adapts layouts for devices
Animations and Interactivity: Creates hover effects, transitions, and keyframe
animations.
UI Design: Style buttons, forms, and other interface components
Style – contains a rule that defines the presentational info
Stylesheet – A collection of styles, commonly saved on a separate file with an extension .css
Basic Syntax of CSS:
A CSS rule-set contains:
1. Selector – Targets the HTML elements to style.
2. Declaration Block – Contains one or more declarations enclosed in {}
3. Property and Value – Specifies the style, separated by a colon
{} – Defines the beginning and end of a declaration
: - Property and value separator
; - Delimiter for each declaration
Smallest unit of CSS Components – Selector and Declaration
CSS Properties:
Color
Font
Font-size
Background-color
CSS Methods:
Inline style
Internal style
External style
Inline CSS:
Applies by inserting the rule to the HTML tag
Suitable for testing a specific style
Not recommended for actual web pages
Has the highest priority
Internal CSS:
Also known as page style
Applies styles by inserting the rules inside the <style>…<style> tag
Separates content and presentation by placing the styles inside the
<head>…</head>
Has the priority next to inline style
External CSS:
Applies by linking the HTML document to a stylesheet saved on a .CSS file
Link is achieved by through use of the <link> tag
Has the least priority among the types of styles
Formatting Fonts:
Font:
A specific typeface of a certain style and size
A typeface is a set of characters of the same design
These characters include symbols, letters, numbers, and punctuation marks.
Font-Family:
Syntax: font-family: <family name>, <generic family>;
<family name> - name of a font family like “times”, “courier”, “arial”, etc.
<generic family> - the name of a generic family like “serif”, “sans-serif”, “monospace”, etc.
Example:
.serif {
font-family: “Times New Roman”, Times, serif;
}
.sansserif {
font-family: “Arial”, Helvetica, sans-serif;
}
.monospace {
font-family: “Courier New”, Courier, monospace;
}
Font-Style:
Syntax: font-style: <value>;
<value> - the name of the value can be normal, italic, or oblique.
Example:
.normal {
font-style:normal;
}
.italic {
font-style:italic;
}
.oblique {
font-style:oblique;
}
Font-variant:
Syntax: font-variant: <value>;
<value> - the name of the value can be normal and small-caps
Example:
#small -caps {
font-variant: small-caps;
}
Font-weight:
Syntax: font-weight: <value>;
<value> - the name of the value can be normal, bold,
bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800,
and 900.
Example:
.bolder {
font-weight: bolder;
}
.lighter {
font-weight: lighter;
}
Font-size:
Syntax: font-size: <absolute size> | <relative size> | <length> | <percentage>;
<absolute-size> -xx-small, x-small, small, medium, large, x-large, xx-large
<relative-size> - smaller and larger
<length> - length fixed size in px and cm
<percentage> - %
Example:
.absolute {
font-size: xx-small;
}
.relative {
font-size: larger;
}
.length {
font-size:12px;
}
.percentage {
font-size: 200%;
}
Font
Syntax: font: <values>;
<values> - font-style, font-variant, font-weight, font-size, and font-family
Example:
.desc {
font:italic small-caps bolder 20px Georgia, Garamond, serif;
}
Introduction to Robotics:
The word “robot” derived from the Czech noun “robota”, meaning labor, is an
accomplishment of Capek’s older brother, the cubist painter and writer Josef Capek.
Robot is any machine or mechanical device that automatically operates with humanlike
skill.
Three Laws of Robots:
A robot may not injure a human being.
A robot must obey any orders given to it by humans except where such orders would
conflict the First Law.
A robot must protect its own existence as long as such protection does not conflict
with the first and second law.
Categories of Robots:
Robots on Land – used for research and for dangerous jobs to humans.
Robots in water – robots that can swim
Robots on Air – robots that can fly and usually used to secure places, move around
and report cases.
Types of Robots:
Industrial Robots – used in industrial manufacturing environment
Domestic/Household Robots – robots used at home
Medical Robots – robots used in medicine and medical institutions
Service/Smart Robots – robots made to show off technologies, robots used for
research, etc.
Military Robots – includes bomb disposal robots, different transportation robots,
reconnaissance drones.
Entertainment Robots – robots used for entertainment
Space Robots – robots used in space
Hobby and Competition Robots - robots that you create. Line followers, sumo-bots,
robots made just for fun and robots made for competition.
Robots are machines that perform tasks in the physical world. Artificial Intelligence (AI)
acts as the "brain" of a robot. AI provides the robot with the ability to make decisions, learn
from experiences, recognize patterns, and adapt to new situations.
Robotics Lesson 1:
Robotics – a part of mechatronics that deals with the study of technology associated with
the design, manufacturing, application, and operation of robots.
The Father of Robotics – Joseph F. Engelberger
Robot – a physical mechanism or a virtual artificial agent which has ability to do a specific
action on the given instruction.