SlideShare a Scribd company logo
1 of 36
Download to read offline
IT2253 Web Essentials
Unit II – Web Designing
Kaviya.P
Kamaraj College of Engineering & Technology
Unit II – Web Designing
HTML - Form Elements - Input types and Media
elements - HTML 5 - CSS3 - Selectors, Box Model,
Backgrounds and Borders, Text Effects, Animations,
Multiple Column Layout, User Interface.
HTML
• HTML stands for Hyper Text Markup Language.
• Hypertext is simply a piece of text that works as a link.
• Markup Language is language of writing layout within documents.
• HTML is not a case sensitive language.
• The extension of the HTML program should be either html or htm.
Comments in HTML
• <!-- It is a comment statement -->
HTML 5.0
• The HTML 5.0 is the fifth revision of HTML standard.
Features of HTML 5.0
• The HTML doctype is just impossible to memorize (!DOCTYPE html
PUBLIC…). Hence new html doctype is <!DOCTYPE html>
• New graphic elements such as <canvas> and <svg>
• Supports multimedia elements such as <audio> and <video>
• Supports <header>, <footer>, <article> and <section>
• Supports new form controls such as number, date, time, calendar and range
• Rich set of API for geolocations, HTML Drag and Drop, Local Storage,
Application cache and so on.
HTML Vs. HTML 5.0
HTML HTML 5.0
The DOCTYPE declaration is much longer
such as <!DOCTYPE html PUBLIC "-
//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1
1.dtd">
The DOCTYPE declaration is simple
<!DOCTYPE html>
<audio> and <video> tags are not supported
<audio> and <video> tags are supported for
playing audio and video files
Finding out geographic location is
impossible using HTML
The HTML5 supports the API for identifying
the geographic location
It supports the tag such as <applet>, <big>,
<center>, <font>. <frame>, <strike>
The tags that are removed from HTML5 are
<applet>, <big>, <center>, <font>. <frame>,
<strike>
JavaScript runs in same thread as browser
interface.
It allows JavaScript to run in background
There is no support for <canvas> The <canvas> tag is for 2D drawing
It needs external plugins such as flash The need for external plugin is reduced
Form Elements
• The HTML <form> element is used to create an HTML form to get user
input.
• The <form> element is a container for different types of input elements,
such as: text fields, checkboxes, radio buttons, submit buttons, etc.
• <form> Attributes
Attribute Description
action Specifies where to send the form-data when a form is submitted
method Specifies the HTTP method to use when sending form-data
name Specifies the name of the form
target Specifies where to display the response that is received after submitting the form
Form Elements
Tag Description
<form> Defines an HTML form for user input
<input> Defines an input control
<textarea> Defines a multiline input control (text area)
<label> Defines a label for an <input> element
<fieldset> Groups related elements in a form
<legend> Defines a caption for a <fieldset> element
<select> Defines a drop-down list
<optgroup> Defines a group of related options in a drop-down list
<option> Defines an option in a drop-down list
<button> Defines a clickable button
<datalist> Specifies a list of pre-defined options for input controls
<output> Defines the result of a calculation
Input Types
Type Description
<input type="text"> Displays a single-line text input field
<input type="radio"> Displays a radio button (for selecting one of many choices)
<input type="checkbox"> Displays a checkbox (for selecting zero or more of many
choices)
<input type="submit"> Displays a submit button (for submitting the form)
<input type="button"> Displays a clickable button
<input type=”hidden"> Used to define the hidden element
<input type=”file"> Defines a file select field and Browse button to upload a file
<input type=“number”> Control for the input of numeric values
<input type=“range”> Control for the input of numeric values
<input type=“color”> Provide a user interface element that lets a user specify a color
<input type=“date”> Creates a general data input control (YYYY-MM-DD)
<input type=“time”> Creates a time input control (HH:MM:SS)
Cascading Style Sheets (CSS3)
• CSS is used to control the style of a web document.
• CSS is the acronym for "Cascading Style Sheet".
Syntax
Example
p
{
font-family: verdana;
font-size: 20px;
}
CSS3 – Selectors
• CSS selectors are used to "find" (or select) the HTML elements you want to
style.
CSS element selector: The element selector selects HTML elements based on
the element name. Example: p { text-align: center; color: red; }
CSS id selector: The id selector uses the id attribute of an HTML element to
select a specific element. Example: #para1 { text-align: center; color: red;}
CSS class selector: The class selector selects HTML elements with a specific
class attribute. Example: .center {text-align: center; color: red;}
p.center { text-align: center; color: red;}
<p class="center">This paragraph refers to two classes.</p>
CSS3 – Selectors
CSS universal selector: The universal selector (*) selects all HTML elements
on the page.
Example:
* {
text-align: center;
color: blue;
}
CSS3 – Selectors
CSS grouping selector: The grouping selector selects all the HTML elements
with the same style definitions.
Example:
h1, h2, p {
text-align: center;
color: red;
}
CSS3 – Selectors
Selector Example Example description
#id #firstname Selects the element with id="firstname"
.class .one Selects all elements with class=”one"
element.class p.one Selects only <p> elements with class=”one"
* * Selects all elements
element p Selects all <p> elements
element,elem
ent,..
div, p Selects all <div> elements and all <p>
elements
CSS3 – Box Model
• In CSS, the term "box model" is used when talking about design and
layout.
• It consists of margins, borders, padding, and the actual content.
CSS3 – Box Model
• Content - The content of the box, where text and images appear
• Padding - Clears an area around the content. The padding is transparent
• Properties
• padding-top
• padding-right
• padding-bottom
• padding-left
• Values
• length: Specifies a padding in px, pt, cm, etc.
• %: Specifies a padding in % of the width of the containing element
• inherit: Specifies that the padding should be inherited from the parent
element
CSS3 – Box Model
• Border - The border-style property specifies what kind of border to
display.
• The border-style property can have from one to four values (top, right,
bottom, and left).
• border-radius property is used to add rounded borders to an element
• Values
• dotted: Defines a dotted border
• dashed: Defines a dashed border
• solid: Defines a solid border
• double: Defines a double border
• groove: Defines a 3D grooved border. The effect depends on the border-color
value
• ridge: Defines a 3D ridged border. The effect depends on the border-color value
• inset: Defines a 3D inset border. The effect depends on the border-color value
• outset: Defines a 3D outset border. The effect depends on the border-color value
• none: Defines no border
• hidden: Defines a hidden border
CSS3 – Box Model
• Border
CSS3 – Box Model
• Margin - Clears an area outside the border. The margin is transparent.
• Properties
• margin-top
• margin-right
• margin-bottom
• margin-left
• Values
• auto: The browser calculates the margin
• length: Specifies a margin in px, pt, cm, etc.
• %: Specifies a margin in % of the width of the containing element
• inherit: Specifies that the margin should be inherited from the parent
element
CSS3 – Backgrounds
• The CSS background properties are used to add background effects for
elements.
• Properties
• background-color
• background-image
• background-repeat
• background-attachment
• background-position
• Opacity/Transparency: The opacity property specifies the
opacity/transparency of an element. It can take a value from 0.0 - 1.0.
div {
background-color: green;
opacity: 0.3;
}
CSS3 – Backgrounds
body {
background-image: url("paper.gif");
background-repeat: repeat-x; //no-repeat
background-position: right top;
background-attachment: fixed; //scroll
}
Shorthand Property
body {
background: #ffffff url("img_tree.png") no-repeat right top;
}
CSS3 – Text Effects
Color Property: Used to set the color of the text. The color is specified by:
• Color name: "red"
• HEX value: "#ff0000"
• RGB value: "rgb(255,0,0)"
Example
body {
color: blue;
}
h1 {
color: green;
}
CSS3 – Text Effects
Text Alignment & Direction
Properties
• text-align: Used to set the horizontal alignment of a text
• text-align-last: Specifies how to align the last line of a text
• direction: Used to change the text direction of an element
• unicode-bidi: Used to change the text direction of an element
• vertical-align: Sets the vertical alignment of an element
CSS3 – Text Effects
Text Decoration
Properties
• text-decoration-line: To add a decoration line to text
• text-decoration-color: To set the color of the decoration line
• text-decoration-style: To set the style of the decoration line
• text-decoration-thickness: To set the thickness of the decoration line
• text-decoration: Sets all the text-decoration properties in one declaration
CSS3 – Text Effects
Text Transformation
Properties
• text-transform: To specify uppercase and lowercase letters in a text. It can
be used to turn everything into uppercase or lowercase letters, or capitalize
the first letter of each word
Example
p.uppercase { text-transform: uppercase; }
p.lowercase { text-transform: lowercase; }
p.capitalize { text-transform: capitalize; }
CSS3 – Text Effects
Text Spacing
Property Description
letter-spacing Specifies the space between characters in a text
line-height Specifies the line height
text-indent Specifies the indentation of the first line in a text-block
white-space Specifies how to handle white-space inside an element
word-spacing Specifies the space between words in a text
CSS3 – Text Effects
Text Shadow
• The text-shadow property adds shadow to text.
Example
h1 {
text-shadow: 2px 2px 5px red; //horizontal, Vertical, Blur, Color
}
CSS3 – Text Effects
Property Description
text-justify
Specifies how justified text should be aligned and
spaced
text-overflow
Specifies how overflowed content that is not displayed
should be signaled to the user
word-break Specifies line breaking rules
word-wrap
Allows long words to be able to be broken and wrap
onto the next line
writing-mode
Specifies whether lines of text are laid out horizontally
or vertically
CSS3 – Transformations
CSS 2D Transformation Methods
Function Description
matrix(n,n,n,n,n,n) Defines a 2D transformation, using a matrix of six values
translate(x,y) Defines a 2D translation, moving the element along the X- and the Y-axis
translateX(n) Defines a 2D translation, moving the element along the X-axis
translateY(n) Defines a 2D translation, moving the element along the Y-axis
scale(x,y) Defines a 2D scale transformation, changing the elements width and height
scaleX(n) Defines a 2D scale transformation, changing the element's width
scaleY(n) Defines a 2D scale transformation, changing the element's height
rotate(angle) Defines a 2D rotation, the angle is specified in the parameter
skew(x-angle,y-angle) Defines a 2D skew transformation along the X- and the Y-axis
skewX(angle) Defines a 2D skew transformation along the X-axis
skewY(angle) Defines a 2D skew transformation along the Y-axis
CSS3 – Transformations
CSS 2D Transformation Methods – Example
div {
transform: translate(50px, 100px);
transform: rotate(20deg);
transform: rotate(-20deg);
transform: scale(2, 3);
transform: scale(0.5, 0.5); //decreases half of its original width and height
transform: scaleX(2); //Width
transform: skew(20deg, 10deg);
transform: skewX(20deg); //skews along the X-axis by the given angle
transform: matrix(1, -0.3, 0, 1, 0, 0); //matrix(scaleX(), skewY(), skewX(), scaleY(),
translateX(), translateY())
}
CSS3 – Animations
CSS allows animation of HTML elements without using JavaScript or Flash
Property Description
@keyframes Specifies the animation code
animation A shorthand property for setting all the animation properties
animation-delay Specifies a delay for the start of an animation
animation-direction
Specifies whether an animation should be played forwards,
backwards or in alternate cycles
animation-duration
Specifies how long time an animation should take to complete one
cycle
animation-fill-mode
Specifies a style for the element when the animation is not playing
(before it starts, after it ends, or both)
animation-iteration-count Specifies the number of times an animation should be played
animation-name Specifies the name of the @keyframes animation
animation-play-state Specifies whether the animation is running or paused
animation-timing-function Specifies the speed curve of the animation
CSS3 – Animations
• An animation lets an element gradually change from one style to another.
• Keyframes hold what styles the element will have at certain times.
Property: animation-direction
• normal: The animation is played as normal (forwards)
• reverse: The animation is played in reverse direction (backwards)
• alternate: The animation is played forwards first, then backwards
• alternate-reverse: The animation is played backwards first, then forwards
Property: animation-timing-function
• ease: Specifies an animation with a slow start, then fast, then end slowly
• linear: Specifies an animation with the same speed from start to end
• ease-in: Specifies an animation with a slow start
• ease-out: Specifies an animation with a slow end
• ease-in-out: Specifies an animation with a slow start and end
CSS3 – Animations
Animation Shorthand Property
div {
animation-name: example;
animation-duration: 5s;
animation-timing-function: linear;
animation-delay: 2s;
animation-iteration-count: infinite;
animation-direction: alternate;
}
div {
animation: example 5s linear 2s infinite alternate;
}
CSS3 – Multiple Column Layout
• Allows easy definition of multiple columns of text - just like in newspapers
CSS3 – Multiple Column Layout
Property Description
column-count Specifies the number of columns an element should be divided into
column-fill Specifies how to fill columns
column-gap Specifies the gap between the columns
column-rule A shorthand property for setting all the column-rule-* properties
column-rule-color Specifies the color of the rule between columns
column-rule-style Specifies the style of the rule between columns
column-rule-width Specifies the width of the rule between columns
column-span Specifies how many columns an element should span across
column-width Specifies a suggested, optimal width for the columns
columns A shorthand property for setting column-width and column-count
CSS3 – Multiple Column Layout
Example
div {
column-count: 3;
column-gap: 40px;
column-rule-style: solid;
column-rule-width: 1px;
column-rule-color: lightblue;
column-width: 100px;
}
h2 {
column-span: all;
}
div {
column-rule: 1px solid lightblue;
}
CSS3 – User Interface
Property Description
outline-offset Adds space between an outline and the edge or border of an element
resize Specifies whether or not an element is resizable by the user
Example (resize):
div {
resize: vertical;
overflow: auto;
}
Example (outlet-offset):
div.ex1 {
margin: 20px;
border: 1px solid black;
outline: 4px solid red;
outline-offset: 15px;
}

More Related Content

What's hot

Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
yht4ever
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
tina1357
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
rahul kundu
 

What's hot (20)

Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Html media
Html mediaHtml media
Html media
 
Web browsers and website publishing
Web browsers and website publishingWeb browsers and website publishing
Web browsers and website publishing
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
 
ASP.NET Basics
ASP.NET Basics ASP.NET Basics
ASP.NET Basics
 
javascript-basics.ppt
javascript-basics.pptjavascript-basics.ppt
javascript-basics.ppt
 
HTML & CSS: Chapter 06
HTML & CSS: Chapter 06HTML & CSS: Chapter 06
HTML & CSS: Chapter 06
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
 
Html frames
Html framesHtml frames
Html frames
 
Xml
XmlXml
Xml
 
Html styles
Html stylesHtml styles
Html styles
 
Static and Dynamic webpage
Static and Dynamic webpageStatic and Dynamic webpage
Static and Dynamic webpage
 
Network & internet presentation
Network & internet presentationNetwork & internet presentation
Network & internet presentation
 
1. web technology basics
1. web technology basics1. web technology basics
1. web technology basics
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
Basics of the Web Platform
Basics of the Web PlatformBasics of the Web Platform
Basics of the Web Platform
 
Introduction to Dreamweaver
Introduction to DreamweaverIntroduction to Dreamweaver
Introduction to Dreamweaver
 
HTML Semantic Tags
HTML Semantic TagsHTML Semantic Tags
HTML Semantic Tags
 

Similar to IT2255 Web Essentials - Unit II Web Designing

vtu HTML+Course+Slide cse notes and .pdf
vtu HTML+Course+Slide cse notes and .pdfvtu HTML+Course+Slide cse notes and .pdf
vtu HTML+Course+Slide cse notes and .pdf
NaveenBhajantri1
 

Similar to IT2255 Web Essentials - Unit II Web Designing (20)

css and Input attributes
css and Input attributescss and Input attributes
css and Input attributes
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
 
vtu HTML+Course+Slide cse notes and .pdf
vtu HTML+Course+Slide cse notes and .pdfvtu HTML+Course+Slide cse notes and .pdf
vtu HTML+Course+Slide cse notes and .pdf
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
 
Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptx
 
5. Frames & Forms.pdf
5. Frames & Forms.pdf5. Frames & Forms.pdf
5. Frames & Forms.pdf
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
CSS
CSSCSS
CSS
 
Html5 ppt
Html5 pptHtml5 ppt
Html5 ppt
 
Html advance
Html advanceHtml advance
Html advance
 
HTML-Advance.pptx
HTML-Advance.pptxHTML-Advance.pptx
HTML-Advance.pptx
 
Kick start @ css
Kick start @ cssKick start @ css
Kick start @ css
 
HTML
HTMLHTML
HTML
 
Html and css
Html and cssHtml and css
Html and css
 
Introduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and JqueryIntroduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and Jquery
 
Lab1_HTML.pptx
Lab1_HTML.pptxLab1_HTML.pptx
Lab1_HTML.pptx
 

More from pkaviya

BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdfBT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
pkaviya
 
OIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question BankOIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question Bank
pkaviya
 
CS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question BankCS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question Bank
pkaviya
 
CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V
pkaviya
 
CS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit IIICS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit III
pkaviya
 

More from pkaviya (20)

IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdfIT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
IT2255 Web Essentials - Unit IV Server-Side Processing and Scripting - PHP.pdf
 
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdfBT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
BT2252 - ETBT - UNIT 3 - Enzyme Immobilization.pdf
 
OIT552 Cloud Computing Material
OIT552 Cloud Computing MaterialOIT552 Cloud Computing Material
OIT552 Cloud Computing Material
 
OIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question BankOIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question Bank
 
CS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question BankCS8791 Cloud Computing - Question Bank
CS8791 Cloud Computing - Question Bank
 
CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V CS8592 Object Oriented Analysis & Design - UNIT V
CS8592 Object Oriented Analysis & Design - UNIT V
 
CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV
 
CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III CS8592 Object Oriented Analysis & Design - UNIT III
CS8592 Object Oriented Analysis & Design - UNIT III
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT II
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT V
 
CS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IVCS8591 Computer Networks - Unit IV
CS8591 Computer Networks - Unit IV
 
CS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit IIICS8591 Computer Networks - Unit III
CS8591 Computer Networks - Unit III
 
CS8591 Computer Networks - Unit II
CS8591 Computer Networks - Unit II CS8591 Computer Networks - Unit II
CS8591 Computer Networks - Unit II
 
CS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit ICS8591 Computer Networks - Unit I
CS8591 Computer Networks - Unit I
 
IT8602 Mobile Communication - Unit V
IT8602 Mobile Communication - Unit V IT8602 Mobile Communication - Unit V
IT8602 Mobile Communication - Unit V
 
IT8602 - Mobile Communication Unit IV
IT8602 - Mobile Communication   Unit IV IT8602 - Mobile Communication   Unit IV
IT8602 - Mobile Communication Unit IV
 
IT8602 Mobile Communication - Unit III
IT8602 Mobile Communication  - Unit IIIIT8602 Mobile Communication  - Unit III
IT8602 Mobile Communication - Unit III
 
IT8602 Mobile Communication Unit II
IT8602 Mobile Communication   Unit II IT8602 Mobile Communication   Unit II
IT8602 Mobile Communication Unit II
 
IT8602 Mobile Communication Question Bank
IT8602 Mobile Communication Question BankIT8602 Mobile Communication Question Bank
IT8602 Mobile Communication Question Bank
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 

IT2255 Web Essentials - Unit II Web Designing

  • 1. IT2253 Web Essentials Unit II – Web Designing Kaviya.P Kamaraj College of Engineering & Technology
  • 2. Unit II – Web Designing HTML - Form Elements - Input types and Media elements - HTML 5 - CSS3 - Selectors, Box Model, Backgrounds and Borders, Text Effects, Animations, Multiple Column Layout, User Interface.
  • 3. HTML • HTML stands for Hyper Text Markup Language. • Hypertext is simply a piece of text that works as a link. • Markup Language is language of writing layout within documents. • HTML is not a case sensitive language. • The extension of the HTML program should be either html or htm. Comments in HTML • <!-- It is a comment statement -->
  • 4. HTML 5.0 • The HTML 5.0 is the fifth revision of HTML standard. Features of HTML 5.0 • The HTML doctype is just impossible to memorize (!DOCTYPE html PUBLIC…). Hence new html doctype is <!DOCTYPE html> • New graphic elements such as <canvas> and <svg> • Supports multimedia elements such as <audio> and <video> • Supports <header>, <footer>, <article> and <section> • Supports new form controls such as number, date, time, calendar and range • Rich set of API for geolocations, HTML Drag and Drop, Local Storage, Application cache and so on.
  • 5. HTML Vs. HTML 5.0 HTML HTML 5.0 The DOCTYPE declaration is much longer such as <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1 1.dtd"> The DOCTYPE declaration is simple <!DOCTYPE html> <audio> and <video> tags are not supported <audio> and <video> tags are supported for playing audio and video files Finding out geographic location is impossible using HTML The HTML5 supports the API for identifying the geographic location It supports the tag such as <applet>, <big>, <center>, <font>. <frame>, <strike> The tags that are removed from HTML5 are <applet>, <big>, <center>, <font>. <frame>, <strike> JavaScript runs in same thread as browser interface. It allows JavaScript to run in background There is no support for <canvas> The <canvas> tag is for 2D drawing It needs external plugins such as flash The need for external plugin is reduced
  • 6. Form Elements • The HTML <form> element is used to create an HTML form to get user input. • The <form> element is a container for different types of input elements, such as: text fields, checkboxes, radio buttons, submit buttons, etc. • <form> Attributes Attribute Description action Specifies where to send the form-data when a form is submitted method Specifies the HTTP method to use when sending form-data name Specifies the name of the form target Specifies where to display the response that is received after submitting the form
  • 7. Form Elements Tag Description <form> Defines an HTML form for user input <input> Defines an input control <textarea> Defines a multiline input control (text area) <label> Defines a label for an <input> element <fieldset> Groups related elements in a form <legend> Defines a caption for a <fieldset> element <select> Defines a drop-down list <optgroup> Defines a group of related options in a drop-down list <option> Defines an option in a drop-down list <button> Defines a clickable button <datalist> Specifies a list of pre-defined options for input controls <output> Defines the result of a calculation
  • 8. Input Types Type Description <input type="text"> Displays a single-line text input field <input type="radio"> Displays a radio button (for selecting one of many choices) <input type="checkbox"> Displays a checkbox (for selecting zero or more of many choices) <input type="submit"> Displays a submit button (for submitting the form) <input type="button"> Displays a clickable button <input type=”hidden"> Used to define the hidden element <input type=”file"> Defines a file select field and Browse button to upload a file <input type=“number”> Control for the input of numeric values <input type=“range”> Control for the input of numeric values <input type=“color”> Provide a user interface element that lets a user specify a color <input type=“date”> Creates a general data input control (YYYY-MM-DD) <input type=“time”> Creates a time input control (HH:MM:SS)
  • 9. Cascading Style Sheets (CSS3) • CSS is used to control the style of a web document. • CSS is the acronym for "Cascading Style Sheet". Syntax Example p { font-family: verdana; font-size: 20px; }
  • 10. CSS3 – Selectors • CSS selectors are used to "find" (or select) the HTML elements you want to style. CSS element selector: The element selector selects HTML elements based on the element name. Example: p { text-align: center; color: red; } CSS id selector: The id selector uses the id attribute of an HTML element to select a specific element. Example: #para1 { text-align: center; color: red;} CSS class selector: The class selector selects HTML elements with a specific class attribute. Example: .center {text-align: center; color: red;} p.center { text-align: center; color: red;} <p class="center">This paragraph refers to two classes.</p>
  • 11. CSS3 – Selectors CSS universal selector: The universal selector (*) selects all HTML elements on the page. Example: * { text-align: center; color: blue; }
  • 12. CSS3 – Selectors CSS grouping selector: The grouping selector selects all the HTML elements with the same style definitions. Example: h1, h2, p { text-align: center; color: red; }
  • 13. CSS3 – Selectors Selector Example Example description #id #firstname Selects the element with id="firstname" .class .one Selects all elements with class=”one" element.class p.one Selects only <p> elements with class=”one" * * Selects all elements element p Selects all <p> elements element,elem ent,.. div, p Selects all <div> elements and all <p> elements
  • 14. CSS3 – Box Model • In CSS, the term "box model" is used when talking about design and layout. • It consists of margins, borders, padding, and the actual content.
  • 15. CSS3 – Box Model • Content - The content of the box, where text and images appear • Padding - Clears an area around the content. The padding is transparent • Properties • padding-top • padding-right • padding-bottom • padding-left • Values • length: Specifies a padding in px, pt, cm, etc. • %: Specifies a padding in % of the width of the containing element • inherit: Specifies that the padding should be inherited from the parent element
  • 16. CSS3 – Box Model • Border - The border-style property specifies what kind of border to display. • The border-style property can have from one to four values (top, right, bottom, and left). • border-radius property is used to add rounded borders to an element • Values • dotted: Defines a dotted border • dashed: Defines a dashed border • solid: Defines a solid border • double: Defines a double border • groove: Defines a 3D grooved border. The effect depends on the border-color value • ridge: Defines a 3D ridged border. The effect depends on the border-color value • inset: Defines a 3D inset border. The effect depends on the border-color value • outset: Defines a 3D outset border. The effect depends on the border-color value • none: Defines no border • hidden: Defines a hidden border
  • 17. CSS3 – Box Model • Border
  • 18. CSS3 – Box Model • Margin - Clears an area outside the border. The margin is transparent. • Properties • margin-top • margin-right • margin-bottom • margin-left • Values • auto: The browser calculates the margin • length: Specifies a margin in px, pt, cm, etc. • %: Specifies a margin in % of the width of the containing element • inherit: Specifies that the margin should be inherited from the parent element
  • 19. CSS3 – Backgrounds • The CSS background properties are used to add background effects for elements. • Properties • background-color • background-image • background-repeat • background-attachment • background-position • Opacity/Transparency: The opacity property specifies the opacity/transparency of an element. It can take a value from 0.0 - 1.0. div { background-color: green; opacity: 0.3; }
  • 20. CSS3 – Backgrounds body { background-image: url("paper.gif"); background-repeat: repeat-x; //no-repeat background-position: right top; background-attachment: fixed; //scroll } Shorthand Property body { background: #ffffff url("img_tree.png") no-repeat right top; }
  • 21. CSS3 – Text Effects Color Property: Used to set the color of the text. The color is specified by: • Color name: "red" • HEX value: "#ff0000" • RGB value: "rgb(255,0,0)" Example body { color: blue; } h1 { color: green; }
  • 22. CSS3 – Text Effects Text Alignment & Direction Properties • text-align: Used to set the horizontal alignment of a text • text-align-last: Specifies how to align the last line of a text • direction: Used to change the text direction of an element • unicode-bidi: Used to change the text direction of an element • vertical-align: Sets the vertical alignment of an element
  • 23. CSS3 – Text Effects Text Decoration Properties • text-decoration-line: To add a decoration line to text • text-decoration-color: To set the color of the decoration line • text-decoration-style: To set the style of the decoration line • text-decoration-thickness: To set the thickness of the decoration line • text-decoration: Sets all the text-decoration properties in one declaration
  • 24. CSS3 – Text Effects Text Transformation Properties • text-transform: To specify uppercase and lowercase letters in a text. It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word Example p.uppercase { text-transform: uppercase; } p.lowercase { text-transform: lowercase; } p.capitalize { text-transform: capitalize; }
  • 25. CSS3 – Text Effects Text Spacing Property Description letter-spacing Specifies the space between characters in a text line-height Specifies the line height text-indent Specifies the indentation of the first line in a text-block white-space Specifies how to handle white-space inside an element word-spacing Specifies the space between words in a text
  • 26. CSS3 – Text Effects Text Shadow • The text-shadow property adds shadow to text. Example h1 { text-shadow: 2px 2px 5px red; //horizontal, Vertical, Blur, Color }
  • 27. CSS3 – Text Effects Property Description text-justify Specifies how justified text should be aligned and spaced text-overflow Specifies how overflowed content that is not displayed should be signaled to the user word-break Specifies line breaking rules word-wrap Allows long words to be able to be broken and wrap onto the next line writing-mode Specifies whether lines of text are laid out horizontally or vertically
  • 28. CSS3 – Transformations CSS 2D Transformation Methods Function Description matrix(n,n,n,n,n,n) Defines a 2D transformation, using a matrix of six values translate(x,y) Defines a 2D translation, moving the element along the X- and the Y-axis translateX(n) Defines a 2D translation, moving the element along the X-axis translateY(n) Defines a 2D translation, moving the element along the Y-axis scale(x,y) Defines a 2D scale transformation, changing the elements width and height scaleX(n) Defines a 2D scale transformation, changing the element's width scaleY(n) Defines a 2D scale transformation, changing the element's height rotate(angle) Defines a 2D rotation, the angle is specified in the parameter skew(x-angle,y-angle) Defines a 2D skew transformation along the X- and the Y-axis skewX(angle) Defines a 2D skew transformation along the X-axis skewY(angle) Defines a 2D skew transformation along the Y-axis
  • 29. CSS3 – Transformations CSS 2D Transformation Methods – Example div { transform: translate(50px, 100px); transform: rotate(20deg); transform: rotate(-20deg); transform: scale(2, 3); transform: scale(0.5, 0.5); //decreases half of its original width and height transform: scaleX(2); //Width transform: skew(20deg, 10deg); transform: skewX(20deg); //skews along the X-axis by the given angle transform: matrix(1, -0.3, 0, 1, 0, 0); //matrix(scaleX(), skewY(), skewX(), scaleY(), translateX(), translateY()) }
  • 30. CSS3 – Animations CSS allows animation of HTML elements without using JavaScript or Flash Property Description @keyframes Specifies the animation code animation A shorthand property for setting all the animation properties animation-delay Specifies a delay for the start of an animation animation-direction Specifies whether an animation should be played forwards, backwards or in alternate cycles animation-duration Specifies how long time an animation should take to complete one cycle animation-fill-mode Specifies a style for the element when the animation is not playing (before it starts, after it ends, or both) animation-iteration-count Specifies the number of times an animation should be played animation-name Specifies the name of the @keyframes animation animation-play-state Specifies whether the animation is running or paused animation-timing-function Specifies the speed curve of the animation
  • 31. CSS3 – Animations • An animation lets an element gradually change from one style to another. • Keyframes hold what styles the element will have at certain times. Property: animation-direction • normal: The animation is played as normal (forwards) • reverse: The animation is played in reverse direction (backwards) • alternate: The animation is played forwards first, then backwards • alternate-reverse: The animation is played backwards first, then forwards Property: animation-timing-function • ease: Specifies an animation with a slow start, then fast, then end slowly • linear: Specifies an animation with the same speed from start to end • ease-in: Specifies an animation with a slow start • ease-out: Specifies an animation with a slow end • ease-in-out: Specifies an animation with a slow start and end
  • 32. CSS3 – Animations Animation Shorthand Property div { animation-name: example; animation-duration: 5s; animation-timing-function: linear; animation-delay: 2s; animation-iteration-count: infinite; animation-direction: alternate; } div { animation: example 5s linear 2s infinite alternate; }
  • 33. CSS3 – Multiple Column Layout • Allows easy definition of multiple columns of text - just like in newspapers
  • 34. CSS3 – Multiple Column Layout Property Description column-count Specifies the number of columns an element should be divided into column-fill Specifies how to fill columns column-gap Specifies the gap between the columns column-rule A shorthand property for setting all the column-rule-* properties column-rule-color Specifies the color of the rule between columns column-rule-style Specifies the style of the rule between columns column-rule-width Specifies the width of the rule between columns column-span Specifies how many columns an element should span across column-width Specifies a suggested, optimal width for the columns columns A shorthand property for setting column-width and column-count
  • 35. CSS3 – Multiple Column Layout Example div { column-count: 3; column-gap: 40px; column-rule-style: solid; column-rule-width: 1px; column-rule-color: lightblue; column-width: 100px; } h2 { column-span: all; } div { column-rule: 1px solid lightblue; }
  • 36. CSS3 – User Interface Property Description outline-offset Adds space between an outline and the edge or border of an element resize Specifies whether or not an element is resizable by the user Example (resize): div { resize: vertical; overflow: auto; } Example (outlet-offset): div.ex1 { margin: 20px; border: 1px solid black; outline: 4px solid red; outline-offset: 15px; }