HTML
HTML
Markup
Language
Reporters:
Andre Pete Flores
Jomar Cedeño
Gian Carl Bello
Jaryl Andrei Rodelas
John Paul Juaman
Charles Arcamo
Joshua Bueta
Arby Vasquez
John Jerby Ramirez
TABLE OF CONTENTS
HTML Forms
Pages 22-29 03
HTML Colors
•RBG
•RBGA
•Color names
•HEX
•HSL
•HSLA
2.RGBA (Red, Green, Blue,
1.RGB (Red, Green,
Alpha)
Blue) •RGBA adds an alpha channel for
•RGB colors are defined using the transparency.
rgb() function. •The alpha value ranges from 0
•Each value (red, green, blue) (fully transparent) to 1 (fully
ranges from 0 to 255. opaque).
•Example: rgb(255, 0, 0) is pure red.
Example: rgba(0, 0, 255, 0.5) is
semi-transparent blue.
Example code: Example code:
<p style="color: rgb(255, 0, <p style="color: rgba(255, 0, 0,
0);">This text is red using 0.5);">This text is semi-transparent
RGB.</p> red using RGBA.</p>
<p style="background-color: rgb(0, <div style="background-color: rgba(0,
255, 0);">This has a green 255, 0, 0.3); padding: 10px;">
background using RGB.</p> This has a semi-transparent green
Output: background using RGBA.
</div>
Output:
3. Color Names 4. HEX Colors
•HTML5 supports 140 predefined HEX (Hexadecimal Color Code) is a
color names (e.g., red, blue, way to define colors in HTML &
green, coral, rebeccapurple, CSS using a 6-digit or 3-digit
etc.). code. It starts with # followed
by numbers (0-9) and letters (A-
Example code: F).
<p style="color: blue;">This text is
blue using a color name.</p> Example of HEX
<p style="background-color: Colors:
orange;">This has an orange
background using a color #FF0000 → Red
name.</p> #00FF00 → Green
#0000FF → Blue
Output: #FFFF00 → Yellow
#FFFFFF → White
#000000 → Black
Output:
Example code:
<!DOCTYPE html>
<html>
<body>
<h1 style=”background-
color:black; color:
#ff0000;”>#ff0000 = red</h1>
<h1 style=”background-color:
gray; color: #0000ff;”>#0000ff
= blue</h1>
<h1 style=”background-color:
pink; color:
#3cb371;”>#3cb371 =
green</h1>
<h1 style=”background-color:
black; color:
#ee82ee;”>#ee82ee =
violet</h1>
<h1 style=”background-color:
brown; color:
#ffa500;”>#ffa500 =
orange</h1>
5. HSL Colors
HSL (Hue, Saturation, and Lightness)
HSL is a modern way to specify colors in HTML and CSS. It consists of three components:
Hue (H): Represents the color type in degrees on a color wheel (0-360). For example, 0 is red, 120 is green,
and 240 is blue.
Saturation (S): Defines the intensity of the color (0% is grayscale, 100% is the full color).
Lightness (L): Determines how light or dark the color is (0% is black, 100% is white).
Alpha (A): Defines the opacity of the color, raging from 0 (completely transparent) to 1 (fully opaque).
Example code:
</html<!DOCTYPE html> Output:
<html>
<h1 style=”color: hsla(0, 100%, 50%, 0.5); background-color:black;”> 0 is
red.</h1>
<h1 style=”color: hsla(30, 100%, 50%, 0.5); background-color: black;”>30
is orange.</h1>
<h1 style=”color: hsla(60, 100%, 50%, 0.5); background-color: black;”>
60 is yellow.</h1>
<h1 style=”color: hsl(120, 100%, 50%, 0.5); background-color: black;”>
120 is green.</h1>
<h1 style=”color: hsl(180, 100%, 50%, 0.5); background-color: black;”>
180 is cyan.</h1>
<h1 style=”color: hsl(240, 100%, 50%, 0.5);background-color: black;”>
240 is blue.</h1>
HTML List
• Unordered List
• Ordered List
• Description List
• Nested List
• Control List Counting
UNORDERED HTML
LIST
An unordered list starts with the
<ul> tag. Each list item starts
with the <li> tag.
EXAMPLE – CIRCLE
EXAMPLE - SQUARE
EXAMPLE – NONE
ORDERED HTML LIST
An ordered list starts with the <ol>
tag. Each list item starts with
the <li> tag.
EXAMPLE – UPPERCASE
LETTERS
EXAMPLE – LOWERCASE
LETTERS
Example code:
<form>
<label for="fname">First
name:</label><br>
<input type="text" id="fname"
name="fname"><br>
<label for="lname">Last
name:</label><br>
<input type="text" id="lname"
name="lname">
</form>.
The <label> Element
Notice the use of the <label> element in the example above.
The <label> element is useful for screen-reader users, because the screen-
reader will read out loud the label when the user focuses on the input
element.
The <label> element also helps users who have difficulty clicking on very
small regions (such as radio buttons or checkboxes) - because when
the user clicks the text within the <label> element, it toggles the radio
button/checkbox.
The for attribute of the <label> tag should be equal to the id attribute of
the <input> element to bind them together.
Radio Buttons
The <input type="radio"> defines a radio button.
Example code:
<p>Choose your favorite Web language:</p>
<form>
<input type="radio" id="html"
name="fav_language" value="HTML">
<label for="html">HTML</label><br>
<input type="radio" id="css" name="fav_language"
value="CSS">
<label for="css">CSS</label><br>
<input type="radio" id="javascript"
name="fav_language" value="JavaScript">
<label for="javascript">JavaScript</label>
</form>
Checkboxes
The <input type="checkbox"> defines a checkbox.
Example code:
<form>
<input type="checkbox" id="vehicle1"
name="vehicle1" value="Bike">
<label for="vehicle1"> I have a bike</label><br>
<input type="checkbox" id="vehicle2"
name="vehicle2" value="Car">
<label for="vehicle2"> I have a car</label><br>
<input type="checkbox" id="vehicle3"
name="vehicle3" value="Boat">
<label for="vehicle3"> I have a boat</label>
</form>
Submit Button
The <input type="submit"> defines a button for
submitting the form data to a form-handler.
Example code:
<form action="/action_page.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"
value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname"
value="Doe"><br><br>
<input type="submit" value="Submit">
</form>
The Name Attribute for
<input>
Notice that each input field must have a name
attribute to be submitted.
Example code:
<form action="/action_page.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname"
value="John"><br><br>
<input type="submit" value="Submit">
</form>
HTML Block, Inline
Elements, and span
O
1. Block-Level
Elements 2. Inline Elements
Always start on a new line. Do not start on a new line.
Take up the full width available Only take up as much width as
(stretching from left to right). necessary (wraps around
Commonly used to define content).
sections of a webpage. Typically used inside block
elements.
Example code:
<p>This is a <span style="color:
red;">red</span> word in a
sentence.</p>
<!DOCTYPE html>
<html>
<head>
<title>Image Link</title>
</head>
<body>
<a href="https://www.sample.com"
target="_blank">
<img src="sample.jpg"
alt="Sample Image">
</a>
</body>
</html>
THANK YOU FOR
LISTENING!