Introduction to Web
Technologies
Lecture 2
Julie Iskander,
MSc. Communication and Electronics
HTML Forms
Forms
 Used to send data back to the server to be processed.

 <form></form>
 Contains:
 control elements that get data from the user
 label elements
 Attributes:

 action  url of page where data is sent
 method  GET/POST http request method
Controls
 Controls must have name and value attributes to be
submitted.
 Controls can be disabled using disabled attribute.

 Each control has an initial value and a current value.
 Initial values are set by value attribute.
 Current value when first rendered is set to initial
value.
Control Types
 Buttons:
 To submit form:
 <input type=“submit” />, <button
type=“submit”></button>

 To reset form:
 <input type=“reset” />, <button type=“reset”></button>

 Just a button with no default behavior
 <input type=“button” />
 <button type=“button”></button>

 Offers richer rendering capabilities then <input
type=“text” />
Control Types
 Checkboxes:





On/off switches.
Must have name to be submitted .
if no value is set, off is the value
Checked attribute is set to make initial value
“on”
 <input type=“checkbox”/>
Control Types
 TextBox:
 Single line text input
 <input type=“text”/>

 Password:
 Similar to TextBox, but input text is rendered as
a series of asterisks or similar characters
 But submitted as plain clear text
 <input type=“password” />
Control Types
 Radiobuttons:
 On/off switches but are mutually exclusive.
 More than one share the same name to create a
mutually exclusive group.
 Checked attribute is set to make initial value
“on” only one of the group at a time.
 <input type=“radio”/>
Control Types
 DropDown Lists/Menus:
 To choose one/more from multiple options.
 Uses
 <select name=“……”></select>

 To select multiple options use multiple attribute
 <select name=“……” multiple></select>

 To define items use
 <option></option>

 Option can have name, value and selected
attributes
Control Types
Control Types
 DropDown Lists/Menus:
 To logically group options use optgroup
 <optgroup label=“…..”></optgroup>

 label attribute is the value that appears in the list.
Control Types
Control Types
 File select:
 Allow users to select files to be submitted to a
form.
 <input type=“file” />
Control Types
 Hidden controls:
 Not rendered visually.
 Values are submitted with the other form data,
can help overcome stateless nature of HTTP.
 <input type=“hidden”
name=“….” value=“….” />
Control Types
 Textarea controls:
 Multiline text input.
 Value is the content nested in the control.
 <textarea>Content </textarea>

 Has rows and cols attributes to set size of textarea.
label
 Specify a label for controls that don‟t have an
implicit label.
 for attribute MUST match ID value of the control
attached to it.
 Useful for speech synthesizers readers,
 <label for=“fname”>First Name :</label>
 <input type=“text” id=“fname”/>
Structuring form
 Use <fieldset> and <legend> to group related
controls and labels.
 Makes forms more accessible especially when
rendered visually.
Example
Example
Cascade Style Sheets
(CSS)
Cascade Style Sheets (CSS)
 “A language for describing the rendering of structured
document as HTML and XHTML” from w3.org
 Provides formatting and layout of html documents.
 Controls presentation, assign styling information to elements.

 Not a markup language
 “cascade”  means multiple stylesheets can be blended
together to affect a page. If conflict occurs the last applied or
the most specific rule is applied.
CSS Rules Syntax
Selector
{
property1: value1;
property2: value2;
property3: value3;

}

Example
body
{

}
p
{
}

background-color:blue;
color:white;
font-size:24pt;

color:yellow;
Where to add CSS?
 Inline style attribute

 Applied to a single element
<p style=“color : pink ; font-size : 30pt ;”

 In <head>

 Applied to an entire single page
<head>
<style>
body{
font-family : arial ;
background-color : black ;
color : white ;
}
p { color : pink ; }
</style>
</head>
Where to add CSS?
• In external sheet (.css)
•

Applied to any html file linked to it

page.html

style.css

<head>
……………………..
<link rel=“stylesheet”
type=“text/css” href=“style.css” />
</head>
url to css file

(no markup only css rules)
body{
font-family : arial ;
background-color : black
color : white ;
}
p { color : pink ; }
CSS Selectors
 Types of Selectors:
 Simple Selectors
 type, class, ID, attribute, pseudo-class
 Group Selectors
 coma-separated list of selectors
Type Selector
 Select by name of element (h1, p, div, span, …..etc.
 Example:
p
{
font-size:20pt;

}
Attribute Selector
 Select an element by the attributes defined in it.

 Example:
[href] /*select any element with attribute named href*/
{
font-size : 20pt ;
}
h1[title] /*select any h1 element with title attribute defined */
{
color : red ; }
a[href=“http://www.google.com”]
/*select any a element with href exactly equal
http://www.google.com */
{
color : blue ; }
Class Selector
 Select an element by the class attributes defined in it.

 Class is an attribute of most html elements, specifies one or
more class names (space-separated list)
 Example:
.maincontent /*select any element with class=“maincontent” */
{
font-size : 20pt;
}
H1.headerTitle /*select the all h1 with class=“headerTitle” */
{
color : red; }
ID Selector
 Select an element by the ID attributes defined in it.

 ID is an attribute of all html elements, it must be unique
throughout a certain html page
 Example:
#maincontent /*select the element with id=“maincontent” */
{
font-size : 20pt;
}
h1#headerTitle /*select the only h1 with id=“headerTitle” */
{
color : red; }
PseudoClass Selector
 Selection based on special effects, Identified by „:‟

 Link:
 :link, :visited, :target

 User actions:
 :hover, :active, :focus

 UI elements states:
 :enabled, :disabled, :checked

 Structural :
 :first-child, :last-child, :nth-child(), :empty, :not()
PseudoClass Selector
(Cont‟d)
 Example:
a:hover /*applied when mouse hover over any link */
{
font-size:20pt; }
a.red:hover /*applied when mouse hover over link with
class=“red” */
{
font-size:20pt; }
Input[type=“text”]:disabled /*applied to any textbox which is
disabled */
{
color:red; }
PseudoElement Selector
 Selection based on parts of elements, Identified by „::‟





::first-letter
::before
::after
::first-line

 Examples:
p::after
{
content:”this content is added after the p”
color:red;
}
Combinators
 Combine selectors specified by relation between elements





Descendant
Direct Childof (>)
Adjacent Sibling (+)
General Sibling(~)

 Examples:
h1 em {……..} /*em descendant of h1*/
div ol > li p{…….} /*p descendant of li which is a direct child
of ol which is a descandent of div*/
span+p{……..} /*p that is a direct adjacent sibling to a span*/
a~p{………} /*p that is sibling of a it may be adjacent or not*/
Example
body{
background-color : black;
color : green ;
}
[href] {
color:pink; }
a[name="next”]{
text-decoration: underline;
}
p.boldp{ font-weight: bold; }
p#pid::first-letter{
font-size: 30px;
}
p::before {
content: "Red text before p”;
color:red;
}
p::after{
content: "Yellow text after p”;
color:yellow;
}

<body>

Trying Style Sheets
<p>This is a paragraph tag <span>a span
nested</span> in it</p>
<p class="boldp">A new paragraph with
more text to be shown describing</p>

<a href="#next">NEXT</a>
<br><br><br>
<a name="next">Here is NEXT</a>
&nbsp;&nbsp;
<p id="pid">Next is more data to
continue desribing the text</p>
</body>
Example
Colors
 Colors can be set using:





Keywords
#-hexadecimal
rgb() and rgba()
hsl() and hsla()

 To get full list of color keywords:
https://developer.mozilla.org/enUS/docs/CSS/color_value
Units in css
 pixel (px) absolute value
 em: ratio of context size
 percentage: percentage of context size
CSS Text Formatting
color : name|#hex|rgb()|rgba()|hsl()|hsla(); /*foreground
color*/

letter-spacing : normal|length (px,%,em);
line-height: normal|number|length|percentage;
text-align: left|right|center|justify;
text-decoration: none|underline|overline|line-through|blink;
text-indent: length|percentage;
text-transform: capitalize|uppercase|lowercase|none;

*text-shadow: rightpx bottompx blurpx color;
direction: ltr | rtl;
*word-wrap: normal|break-word;
CSS Font
font-family: list of font-names to chose from in order if not
supported by browser
font-size: smaller|larger|xx-small|x-small|small|medium|
larger|x-large|xx-large|length|percentage;
font-weight: normal|bold|bolder|lighter|100-900|
font-style: normal|italic|oblique
font-variant: normal|small-caps
font: font-family font-size font-weight font-style font-variant;
Background formatting
 background-attachment : scroll | fixed;

 background-color : color;
 background-image : none | url(path);
 background-position: percent|length|(top left right
bottom center) /*w.r.t to top left*/
 background-repeat: repeat | repeat-x|repeat-y|no-repeat

 *background-size: length|percentage|cover|contain;
 background: background-attachment background-color
background-image background-position background-repeat
Block vs. Inline Elements
Inline
 No newlines before or after it
 Page flow is not broken

 Has no width and height
 Takes as much width of the
page as the content
 Can contain only inline
elements
 Examples:<span>, <a>,
<img>, <b>, <em>,<input>

Block
 Newlines appears before
and after it.
 Can have a width and
height
 Takes the whole page
width
 Can contain inline or block
elements
 Examples:<p>, <div>
References
 http://www.w3.org/TR/html401/
 http://www.w3.org/TR/CSS21/
 http://www.w3.org/TR/CSS2/
 https://developer.mozilla.org/en-US/docs/CSS
 http://www.daaq.net/old/css/index.php?page=us
ing+css
 http://alistapart.com/articles/howtosizetextincss

More Related Content

PPTX
html forms
PPTX
HTML Forms Tutorial
PPTX
Html form tag
PPTX
Html tables, forms and audio video
PPTX
HTML Forms
PPTX
PPT
05 html-forms
html forms
HTML Forms Tutorial
Html form tag
Html tables, forms and audio video
HTML Forms
05 html-forms

What's hot (20)

PDF
2. HTML forms
PPTX
Entering User Data from a Web Page HTML Forms
PPTX
Forms with html5 (1)
PPTX
Html forms
PDF
Html css
PPTX
New Form Element in HTML5
PPTX
Web engineering - HTML Form
PDF
Html forms
PPTX
FYBSC IT Web Programming Unit III Document Object
PPSX
HTML5 - Forms
PPTX
HTML Forms
PPTX
HTML5 Web Forms
PPTX
html 5 new form attribute
DOCX
Html 5 tags
PDF
PPTX
Form using html and java script validation
PPT
A quick guide to Css and java script
PPTX
Forms in html5
PDF
Html5 appunti.0
PDF
Web Development Course: PHP lecture 2
2. HTML forms
Entering User Data from a Web Page HTML Forms
Forms with html5 (1)
Html forms
Html css
New Form Element in HTML5
Web engineering - HTML Form
Html forms
FYBSC IT Web Programming Unit III Document Object
HTML5 - Forms
HTML Forms
HTML5 Web Forms
html 5 new form attribute
Html 5 tags
Form using html and java script validation
A quick guide to Css and java script
Forms in html5
Html5 appunti.0
Web Development Course: PHP lecture 2
Ad

Similar to HTML and CSS part 2 (20)

PPT
Html class-04
DOCX
PPTX
Introduction to Html5, css, Javascript and Jquery
PPT
Web forms and html lecture Number 4
ODP
Cascading Style Sheets - Part 01
PPT
331592291-HTML-and-Cascading style sheet
PPTX
HTML - hypertext markup language
PPT
20 html-forms
PPTX
HTML Forms: The HTML element represents a document section containing interac...
PPTX
Html advance
PPTX
HTML-Advance.pptx
PDF
WEB DESIGN AND INTERNET PROGRAMMING LAB MANUAL.pdf
PPT
Intodcution to Html
PDF
CSS_Forms.pdf
PPT
Chapter 4a cascade style sheet css
DOCX
Computer application html
PDF
HTML-Forms
DOCX
Structured Graphics in dhtml and active controls.docx
Html class-04
Introduction to Html5, css, Javascript and Jquery
Web forms and html lecture Number 4
Cascading Style Sheets - Part 01
331592291-HTML-and-Cascading style sheet
HTML - hypertext markup language
20 html-forms
HTML Forms: The HTML element represents a document section containing interac...
Html advance
HTML-Advance.pptx
WEB DESIGN AND INTERNET PROGRAMMING LAB MANUAL.pdf
Intodcution to Html
CSS_Forms.pdf
Chapter 4a cascade style sheet css
Computer application html
HTML-Forms
Structured Graphics in dhtml and active controls.docx
Ad

More from Julie Iskander (20)

PPTX
PPTX
Data structures and algorithms
PPTX
C for Engineers
PPTX
Design Pattern lecture 3
PPTX
Scriptaculous
PPTX
Prototype Framework
PPTX
Design Pattern lecture 4
PPTX
Design Pattern lecture 2
PPTX
Design Pattern lecture 1
PPTX
Ajax and ASP.NET AJAX
PPTX
PPTX
ASP.NET Lecture 5
PPTX
ASP.NET lecture 8
PPTX
ASP.NET Lecture 7
PPTX
ASP.NET Lecture 6
PPTX
ASP.NET Lecture 4
PPTX
ASP.NET Lecture 3
PPTX
ASP.NET Lecture 2
PPTX
ASP.NET Lecture 1
PPTX
AJAX and JSON
Data structures and algorithms
C for Engineers
Design Pattern lecture 3
Scriptaculous
Prototype Framework
Design Pattern lecture 4
Design Pattern lecture 2
Design Pattern lecture 1
Ajax and ASP.NET AJAX
ASP.NET Lecture 5
ASP.NET lecture 8
ASP.NET Lecture 7
ASP.NET Lecture 6
ASP.NET Lecture 4
ASP.NET Lecture 3
ASP.NET Lecture 2
ASP.NET Lecture 1
AJAX and JSON

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPT
What is a Computer? Input Devices /output devices
PPTX
TEXTILE technology diploma scope and career opportunities
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Five Habits of High-Impact Board Members
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
Architecture types and enterprise applications.pdf
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PPTX
The various Industrial Revolutions .pptx
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Statistics on Ai - sourced from AIPRM.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
sbt 2.0: go big (Scala Days 2025 edition)
What is a Computer? Input Devices /output devices
TEXTILE technology diploma scope and career opportunities
Benefits of Physical activity for teenagers.pptx
Five Habits of High-Impact Board Members
UiPath Agentic Automation session 1: RPA to Agents
A proposed approach for plagiarism detection in Myanmar Unicode text
Custom Battery Pack Design Considerations for Performance and Safety
Architecture types and enterprise applications.pdf
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Improvisation in detection of pomegranate leaf disease using transfer learni...
The various Industrial Revolutions .pptx
Final SEM Unit 1 for mit wpu at pune .pptx
Zenith AI: Advanced Artificial Intelligence
Microsoft Excel 365/2024 Beginner's training
Consumable AI The What, Why & How for Small Teams.pdf
The influence of sentiment analysis in enhancing early warning system model f...
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Statistics on Ai - sourced from AIPRM.pdf

HTML and CSS part 2

  • 1. Introduction to Web Technologies Lecture 2 Julie Iskander, MSc. Communication and Electronics
  • 3. Forms  Used to send data back to the server to be processed.  <form></form>  Contains:  control elements that get data from the user  label elements  Attributes:  action  url of page where data is sent  method  GET/POST http request method
  • 4. Controls  Controls must have name and value attributes to be submitted.  Controls can be disabled using disabled attribute.  Each control has an initial value and a current value.  Initial values are set by value attribute.  Current value when first rendered is set to initial value.
  • 5. Control Types  Buttons:  To submit form:  <input type=“submit” />, <button type=“submit”></button>  To reset form:  <input type=“reset” />, <button type=“reset”></button>  Just a button with no default behavior  <input type=“button” />  <button type=“button”></button>  Offers richer rendering capabilities then <input type=“text” />
  • 6. Control Types  Checkboxes:     On/off switches. Must have name to be submitted . if no value is set, off is the value Checked attribute is set to make initial value “on”  <input type=“checkbox”/>
  • 7. Control Types  TextBox:  Single line text input  <input type=“text”/>  Password:  Similar to TextBox, but input text is rendered as a series of asterisks or similar characters  But submitted as plain clear text  <input type=“password” />
  • 8. Control Types  Radiobuttons:  On/off switches but are mutually exclusive.  More than one share the same name to create a mutually exclusive group.  Checked attribute is set to make initial value “on” only one of the group at a time.  <input type=“radio”/>
  • 9. Control Types  DropDown Lists/Menus:  To choose one/more from multiple options.  Uses  <select name=“……”></select>  To select multiple options use multiple attribute  <select name=“……” multiple></select>  To define items use  <option></option>  Option can have name, value and selected attributes
  • 11. Control Types  DropDown Lists/Menus:  To logically group options use optgroup  <optgroup label=“…..”></optgroup>  label attribute is the value that appears in the list.
  • 13. Control Types  File select:  Allow users to select files to be submitted to a form.  <input type=“file” />
  • 14. Control Types  Hidden controls:  Not rendered visually.  Values are submitted with the other form data, can help overcome stateless nature of HTTP.  <input type=“hidden” name=“….” value=“….” />
  • 15. Control Types  Textarea controls:  Multiline text input.  Value is the content nested in the control.  <textarea>Content </textarea>  Has rows and cols attributes to set size of textarea.
  • 16. label  Specify a label for controls that don‟t have an implicit label.  for attribute MUST match ID value of the control attached to it.  Useful for speech synthesizers readers,  <label for=“fname”>First Name :</label>  <input type=“text” id=“fname”/>
  • 17. Structuring form  Use <fieldset> and <legend> to group related controls and labels.  Makes forms more accessible especially when rendered visually.
  • 21. Cascade Style Sheets (CSS)  “A language for describing the rendering of structured document as HTML and XHTML” from w3.org  Provides formatting and layout of html documents.  Controls presentation, assign styling information to elements.  Not a markup language  “cascade”  means multiple stylesheets can be blended together to affect a page. If conflict occurs the last applied or the most specific rule is applied.
  • 22. CSS Rules Syntax Selector { property1: value1; property2: value2; property3: value3; } Example body { } p { } background-color:blue; color:white; font-size:24pt; color:yellow;
  • 23. Where to add CSS?  Inline style attribute  Applied to a single element <p style=“color : pink ; font-size : 30pt ;”  In <head>  Applied to an entire single page <head> <style> body{ font-family : arial ; background-color : black ; color : white ; } p { color : pink ; } </style> </head>
  • 24. Where to add CSS? • In external sheet (.css) • Applied to any html file linked to it page.html style.css <head> …………………….. <link rel=“stylesheet” type=“text/css” href=“style.css” /> </head> url to css file (no markup only css rules) body{ font-family : arial ; background-color : black color : white ; } p { color : pink ; }
  • 25. CSS Selectors  Types of Selectors:  Simple Selectors  type, class, ID, attribute, pseudo-class  Group Selectors  coma-separated list of selectors
  • 26. Type Selector  Select by name of element (h1, p, div, span, …..etc.  Example: p { font-size:20pt; }
  • 27. Attribute Selector  Select an element by the attributes defined in it.  Example: [href] /*select any element with attribute named href*/ { font-size : 20pt ; } h1[title] /*select any h1 element with title attribute defined */ { color : red ; } a[href=“http://www.google.com”] /*select any a element with href exactly equal http://www.google.com */ { color : blue ; }
  • 28. Class Selector  Select an element by the class attributes defined in it.  Class is an attribute of most html elements, specifies one or more class names (space-separated list)  Example: .maincontent /*select any element with class=“maincontent” */ { font-size : 20pt; } H1.headerTitle /*select the all h1 with class=“headerTitle” */ { color : red; }
  • 29. ID Selector  Select an element by the ID attributes defined in it.  ID is an attribute of all html elements, it must be unique throughout a certain html page  Example: #maincontent /*select the element with id=“maincontent” */ { font-size : 20pt; } h1#headerTitle /*select the only h1 with id=“headerTitle” */ { color : red; }
  • 30. PseudoClass Selector  Selection based on special effects, Identified by „:‟  Link:  :link, :visited, :target  User actions:  :hover, :active, :focus  UI elements states:  :enabled, :disabled, :checked  Structural :  :first-child, :last-child, :nth-child(), :empty, :not()
  • 31. PseudoClass Selector (Cont‟d)  Example: a:hover /*applied when mouse hover over any link */ { font-size:20pt; } a.red:hover /*applied when mouse hover over link with class=“red” */ { font-size:20pt; } Input[type=“text”]:disabled /*applied to any textbox which is disabled */ { color:red; }
  • 32. PseudoElement Selector  Selection based on parts of elements, Identified by „::‟     ::first-letter ::before ::after ::first-line  Examples: p::after { content:”this content is added after the p” color:red; }
  • 33. Combinators  Combine selectors specified by relation between elements     Descendant Direct Childof (>) Adjacent Sibling (+) General Sibling(~)  Examples: h1 em {……..} /*em descendant of h1*/ div ol > li p{…….} /*p descendant of li which is a direct child of ol which is a descandent of div*/ span+p{……..} /*p that is a direct adjacent sibling to a span*/ a~p{………} /*p that is sibling of a it may be adjacent or not*/
  • 34. Example body{ background-color : black; color : green ; } [href] { color:pink; } a[name="next”]{ text-decoration: underline; } p.boldp{ font-weight: bold; } p#pid::first-letter{ font-size: 30px; } p::before { content: "Red text before p”; color:red; } p::after{ content: "Yellow text after p”; color:yellow; } <body> Trying Style Sheets <p>This is a paragraph tag <span>a span nested</span> in it</p> <p class="boldp">A new paragraph with more text to be shown describing</p> <a href="#next">NEXT</a> <br><br><br> <a name="next">Here is NEXT</a> &nbsp;&nbsp; <p id="pid">Next is more data to continue desribing the text</p> </body>
  • 36. Colors  Colors can be set using:     Keywords #-hexadecimal rgb() and rgba() hsl() and hsla()  To get full list of color keywords: https://developer.mozilla.org/enUS/docs/CSS/color_value
  • 37. Units in css  pixel (px) absolute value  em: ratio of context size  percentage: percentage of context size
  • 38. CSS Text Formatting color : name|#hex|rgb()|rgba()|hsl()|hsla(); /*foreground color*/ letter-spacing : normal|length (px,%,em); line-height: normal|number|length|percentage; text-align: left|right|center|justify; text-decoration: none|underline|overline|line-through|blink; text-indent: length|percentage; text-transform: capitalize|uppercase|lowercase|none; *text-shadow: rightpx bottompx blurpx color; direction: ltr | rtl; *word-wrap: normal|break-word;
  • 39. CSS Font font-family: list of font-names to chose from in order if not supported by browser font-size: smaller|larger|xx-small|x-small|small|medium| larger|x-large|xx-large|length|percentage; font-weight: normal|bold|bolder|lighter|100-900| font-style: normal|italic|oblique font-variant: normal|small-caps font: font-family font-size font-weight font-style font-variant;
  • 40. Background formatting  background-attachment : scroll | fixed;  background-color : color;  background-image : none | url(path);  background-position: percent|length|(top left right bottom center) /*w.r.t to top left*/  background-repeat: repeat | repeat-x|repeat-y|no-repeat  *background-size: length|percentage|cover|contain;  background: background-attachment background-color background-image background-position background-repeat
  • 41. Block vs. Inline Elements Inline  No newlines before or after it  Page flow is not broken  Has no width and height  Takes as much width of the page as the content  Can contain only inline elements  Examples:<span>, <a>, <img>, <b>, <em>,<input> Block  Newlines appears before and after it.  Can have a width and height  Takes the whole page width  Can contain inline or block elements  Examples:<p>, <div>
  • 42. References  http://www.w3.org/TR/html401/  http://www.w3.org/TR/CSS21/  http://www.w3.org/TR/CSS2/  https://developer.mozilla.org/en-US/docs/CSS  http://www.daaq.net/old/css/index.php?page=us ing+css  http://alistapart.com/articles/howtosizetextincss

Editor's Notes

  • #4: Get for idempotent forms that has no side effects, ex. Search forms, name=value pair appended to url after ‘?’Post for forms that will cause side effect like database modifications. name=value pairs are send in request body.
  • #9: Mutually exclusive  only one is “on” at ant time.
  • #11: Example of multi-select menu
  • #13: Example select with options groups
  • #31: There are more in each category, refer to w3.org for full lists
  • #33: There are more in each category, refer to w3.org for full lists
  • #39: In html 5text-shadow: if right is –ve, then acts as left, if bottomis –ve, then acts as top
  • #40: Default font-size is 16pxRecommended use by w3.org body{ font-size:100%;} All other elements {font-size: ….em}
  • #41: Background-size in CSS3 can be 100px 100px (length of width then height) 20% 30% (percentage of width then height)
  • #42: Block boxes laid vertically, starting at the top, Inline boxes laid horizontally, starting at the top, vertical margins are ignored, width and height can’t be specified.