Professional Web Developer - Ei Maung
Professional Web Developer - Ei Maung
http://mlmtechnological.blogspot.com
ProfessionalWebDeveloperbyEiMaung
ProfessionalWebDeveloper
TableofContentsandSampleChapters
Copyright2013,EiMaung,FairwayWebDevelopment.
LicenseCCBYNCSA
Thisdocument,ProfessionalWebDeveloperTableofContentsandSampleChaptersbyEiMaungislicensed
underaCreativeCommonsAttributionNonCommercialShareAlike3.0UnportedLicense.
Thisdocumentisfreetoshare,copy,distributeandtransmit.And,alsoallowtoremixoradapttothisdocument.
But,youmustattributetheworkinthemannerspecifiedbytheauthororlicensor(butnotinanywaythatsuggests
thattheyendorseyouoryouruseofthework).And,youmaynotusethisworkforcommercialpurposes.Ifyou
alter,transform,orbuilduponthiswork,youmaydistributetheresultingworkonlyunderthesameorsimilarlicense
tothisone.
Foranyreuseordistribution,youmustmakecleartoothersthelicensetermsofthiswork.
THEWORKISPROTECTEDBYCOPYRIGHTAND/OROTHERAPPLICABLELAW.ANYUSEOFTHEWORK
OTHERTHANASAUTHORIZEDUNDERTHISLICENSEORCOPYRIGHTLAWISPROHIBITED
http://creativecommons.org/licenses/byncsa/3.0/legalcode
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:1
ProfessionalWebDeveloperbyEiMaung
Web Application
() WebStandards
W3C HyperText Transfer Protocol (HTTP)
() HyperTextMarkupLanguageHTML
Web Document ( ) Semantic Data Structure
() CascadingStyleSheetsCSS
User Interface
() Javascript
Programming Language
() JavascriptFrameworksOverview
Modern Web Rich Internet Application - RIA
() jQuery
Write less, do more
() ServersideProgramingLanguages
Server-side
() WebDevelopmentwithPHP(Part1)
XAMPP One-stop Development Environment
() WebDevelopmentwithPHP(Part2)
PHP/MySQL Database Driven Web Application
() WebDevelopmentwithPHP(Part3)
PHP error handling Apache module
() AjaxwithjQuery
Client-Side Development
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:2
ProfessionalWebDeveloperbyEiMaung
() ContentManagementSystemCMS
General Purpose CMS, Special Purpose CMS
() MVCWebApplicationFrameworks
D.R.Y Don't Repeat Yourself
() HTML5
Application Platform HTML
() WebServices
() RESTandAPI
Representational State Transfer ( ) Semantic Data Transfer
() MobileWeb
Responsive Web Design Mobile First Approach
() WebApplicationSecurity
SQL Injection, XSS
() SearchEngineOptimization
Search Engine
() ToolsandUtilities
Browser Developer Tools, IDEs, Code Editors
()
Open Source
()
Web Hosting Cloud Computing
...
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:3
ProfessionalWebDeveloperbyEiMaung
() Web Standards
W3C HyperText Transfer Protocol (HTTP)
Internet
Wire
Wireless
Network
Network
International Network
Devices
1957
()
ARPA (the Advanced Research Project Agency)
Joseph Licklider
Man-Computer Symbiosis
Network
Joseph Licklider ARPA
Information Process Office
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:4
ProfessionalWebDeveloperbyEiMaung
ARPANET Network
Network
Network packets switching
ARPANET packets switching Network
JANET Network CompuServe
Network Private Network
Network
ARPA Satellite Network
Packets Project Robert Kahn
Vinton Cerf
Mask Protocol
"Internet Transmission Control Program
Network
Network
ARPA Software
Protocol
TCP/IP
Protocol
Network
Network
Tablet Device Device
(Smart Glass) (Smart Watch)
Device IP Address
Device
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:5
ProfessionalWebDeveloperbyEiMaung
Email World Wide Web
Email World Wide Web
""
"
TableofContentsandSampleChaptersPage:6
ProfessionalWebDeveloperbyEiMaung
Web
Developer Web
Document
.) Web Document Web Server Web Server
Web Document
Web
Domain Name
URL (Uniform Resource Locater)
Web URL
(-)
Web URL
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:7
ProfessionalWebDeveloperbyEiMaung
(-) URL
Domain Name
- google.com Image Search, Map,
Reader, News google.com (Home Page)
URL Web "" Web Resource URL
Web Developer
.) Web Browser Web Browser Mosaic
Browser Browser Microsoft
Internet Explorer Mozilla Firefox
Mosaic
Web Browser () Microsoft Internet Explorer, Mozilla
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:8
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:9
ProfessionalWebDeveloperbyEiMaung
TableofContentsandSampleChaptersPage:10
ProfessionalWebDeveloperbyEiMaung
Web Client
Request Web
Server
Respond
Web Client Web Server
HTTP Client
Server
HTTP
Client Request
HTTP Web Client Web Server
Format
GET /foo.html HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0
Accept-Encoding: gzip, deflate
If-Modified-Since: Tue, 26 Feb 2013 05:34:16 GMT
Request Header
GET Request Method
HTTP GET, POST, PUT, DELETE Request Method Client
Request Method
GET Server
POST Server
PUT DELETE HEADER, DEBUG,
TRACK, TRACE Request Method
Request Method
() Web Development with PHP (Part 1) () REST and API
Request Method Document URL
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:11
ProfessionalWebDeveloperbyEiMaung
Server
() Web Development
with PHP (Part 3)
Server
HTTP Request Format Client
Web Browser Address Bar URL Web Browser
HTTP Request Format Server
Developer
Tools Tool LiveHTTPHeader
Firefox
Addon
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:12
ProfessionalWebDeveloperbyEiMaung
Server Respond
Web Server Hardware Server Software Server Hardware Server
HTTP
Server Operating System Run
Web Document File Physical Machine
Software Server HTTP Request
Apache, Nginx, IIS (Microsoft Internet Information Service)
HTTP Web Server Software
Physical Machine Hardware Server Computer Web Server Software Server
Email Server, FTP Server, SSH server Server
(Port Number)
Request
HTTP Web Server Default Port No. 80 80
Request HTTP Web Server
Browser Address Bar URL Port No. Browser 80
Web Server Port No. Setting () Web Development with PHP
(Part 3)
Web Server
Request Request Header
Client
Respond
Header
HTTP Respond Header
HTTP/1.1 200 OK
Date: Mon, 04 Mar 2013 14:03:18 GMT
Server: Apache/2.2.14 (Unix) PHP/5.3.1
Last-Modified: Sun, 03 Mar 2013 20:15:33 GMT
Content-Encoding: gzip
Content-Length: 1448
Content-Type: text/html; charset=utf-8
Status Code 200 OK
Request
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:13
ProfessionalWebDeveloperbyEiMaung
200 OK Request
301 Moved Permanently
Client Request
URL Request
304 Not Modified Server Request Header
If-Modified-Since: Format
307 Temporary Redirect
301 Request
URL
403 Forbidden Request Client
404 Not Found
500 Internal Server Error Server Error
503ServiceUnavailable Server Error
Code Web Server Down
Code
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:14
ProfessionalWebDeveloperbyEiMaung
Pull Technology
HTTP Pull Technology Pull Technology Client Server
Client
Server
Client Pull Technology Server
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:15
ProfessionalWebDeveloperbyEiMaung
(-) HTTP
Stateless Protocol
Stateless Protocol Client Server
Request/Respond State
HTTP Stateless Protocol
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:16
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:17
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:18
ProfessionalWebDeveloperbyEiMaung
Semantic Web
HTML Element Semantic Web
Semantic Web Document
Semantic Web Document
Process W3C HTML
Web Document
Document
Process
Processing Power
Web Browser, Search Engine Spider Software
Web Document
Web
Document
Process Semantic Document
Web Developer Web Document "
"
Web Document Process
Web Document Text
Document
Document
Process
Document Google Search Engine Web Browser
Document
CSS
Style Javascript Element
HTML
Data Structure
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:19
ProfessionalWebDeveloperbyEiMaung
HTML
CSS
Style Language
Browser War
Web Browser Mosaic Marc Andreessen Jim Clark
NCSA Mosaic Communications
Netscape Communications Corporation Netscape Navigator Web Browser
Netscape Navigator Version 1.0
NCSA Spyglass Inc. Mosaic Browser
Microsoft
Mosaic Browser Microsoft Internet Explorer
Microsoft Internet Explorer Mozilla Firefox
Browser Mosaic Mosaic Source
Code Mosaic Netscape Navigator
Browser Firefox
Telenor Opera Web Browser Version
Opera Browser
Opera Web Standards
Web Developer Web Browser
Bowser War
Opera Microsoft Netscape
Web Browser
Web Developer Web Document
Document Internet
Explorer Netscape
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:20
ProfessionalWebDeveloperbyEiMaung
TableofContentsandSampleChaptersPage:21
ProfessionalWebDeveloperbyEiMaung
HTML 4.0 4.01
HTML Semantic Data
Structure Web Document Application
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:22
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:23
ProfessionalWebDeveloperbyEiMaung
HTML5 XHTML
HTML 4.01 Website Backward Compatible
HTML5 () HTML5
HTML Element
HTML Skeleton
HTML Document
Document Type Declaration
HTML Document HTML
Document Element
<!doctype html>
<html>
<head>
<title>Document Title</title>
</head>
<body>
<!-- Document Content -->
</body>
</html>
<!doctype html> Document HTML Document
Document Type Declaration HTML Elements
<html> Element <html> Element
Element <head> Element <body> Element
<head> Element Document
<title> Element <title> Element
Document Title <head> Element
Element <meta> <link> <script> <style>
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:24
ProfessionalWebDeveloperbyEiMaung
Basic Elements
HTML Document
Text Document Text Document
Form Hyperlink
Document Link HTML Document
Element
Document Main Heading
Sub Heading
HTML Document ()
Main Heading <h1> Element <h2> Element
<h3> Element <h4> <h5> <h6>
() Document
<p> Element <p> Element
HTML
Document
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:25
ProfessionalWebDeveloperbyEiMaung
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title> - </title>
</head>
<body>
<h1> </h1>
<img src="nyomya.gif" alt="">
<p>
()
</p>
<p>
( ) ( )
</p>
<h2></h2>
<p>
</p>
</body>
</html>
<head> Element <meta> Element
Element Document English
Browser
English
<body> Element <h1> Element
<h2> Element
() <p> Element
<img> Element
<img> Element
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:26
ProfessionalWebDeveloperbyEiMaung
Empty Element
Close Tag Tag Content
Attribute src Attribute
alt Attribute ''
src
Web Browser
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:27
ProfessionalWebDeveloperbyEiMaung
<h1> Element
<h2> Element
Document Structure
Browser
<h1>
Element
<h1> <h2>
<h2>
Browser Size Size
Style CSS HTML
"
Element
HTML Document White Space
White space "Space Tab "New Line
HTML Document Process Web Browser
White Space Single Space
Document White Space
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:28
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:29
ProfessionalWebDeveloperbyEiMaung
Usability
target=_blank Attribute
Internal Link (Anchor)
Document
HTML Element ID
<h2 id=ch2>Chapter Two</h2>
<h2> Element id Attribute ID
Document <h2> Element <h2>
ID
<a> Element Document
ID <a href=#ch2>Chapter Two</a>
<a> Element href Attribute Document Document
ch2 ID Element #ch2
# Sign
External Link Document Document Element
<a href=http://example.com/toc.html#ch2>Chapter Two</a>
example.com/toc.html Document #ch2 Element
Lists
HTML Document List
Element
<ul> <ol> <ul> Unordered List Bullet
<ol> Ordered List
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:30
ProfessionalWebDeveloperbyEiMaung
List <ol>
<ul>
Bullet
<ul> <ol> Element Item List Item Element <li>
Element
<ol>
<li>Chapter
<li>Chapter
<li>Chapter
<li>Chapter
</ol>
One</li>
Two</li>
Three</li>
Four</li>
<ul>
<li>Yangon</li>
<li>Mandalay</li>
<li>Naypyidaw</li>
<li>Monywa</li>
</ul>
1.
2.
3.
4.
5.
ChapterOne
ChapterTwo
ChapterThree
ChapterFour
ChapterFive
Yangon
Mandalay
Naypyidaw
Monywa
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:31
ProfessionalWebDeveloperbyEiMaung
Tables
<table> Element Rows
Columns
Table Rows Columns
Rows
Table Row <tr> Attribute
Rows Columns Table Data <td> Attribute
<table>
<tr>
<td>484</td>
<td>MX</td>
<td>MEX</td>
<td>Mexico</td>
</tr>
<tr>
<td>504</td>
<td>MA</td>
<td>MAR</td>
<td>Morocco</td>
</tr>
<tr>
<td>104</td>
<td>MM</td>
<td>MMR</td>
<td>Myanmar</td>
</tr>
<tr>
<td>524</td>
<td>NP</td>
<td>NPL</td>
<td>Nepal</td>
</tr>
</table>
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:32
ProfessionalWebDeveloperbyEiMaung
484
MX
MEX
Mexico
504
MA
MAR
Morocco
104
MM
MMR
Myanmar
524
NP
NPL
Nepal
<table>
<tr>
<th>Code</th>
<th>ISO</th>
<th>ISO3</th>
<th>Name</th>
</tr>
<tr>
<td>504</td>
<td>MA</td>
<td>MAR</td>
<td>Morocco</td>
</tr>
<tr>
<td>104</td>
<td>MM</td>
<td>MMR</td>
<td>Myanmar</td>
</tr>
</table>
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:33
ProfessionalWebDeveloperbyEiMaung
Code
ISO
ISO3
Name
504
MA
MAR
Morocco
104
MM
MMR
Myanmar
<table>
<thead>
<tr>
<th colspan=4>Country List</th>
</tr>
</thead>
<tbody>
<tr>
<th>Code</th>
<th>ISO</th>
<th>ISO3</th>
<th>Name</th>
</tr>
<tr>
<td>504</td>
<td>MA</td>
<td>MAR</td>
<td>Morocco</td>
</tr>
<tr>
<td>104</td>
<td>MM</td>
<td>MMR</td>
<td>Myanmar</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan=4>© Copyright 2013</td>
</tr>
</tfoot>
</table>
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:34
ProfessionalWebDeveloperbyEiMaung
Country List
Code
ISO
ISO3
Name
504
MA
MAR
Morocco
104
MM
MMR
Myanmar
Copyright 2013
<thead> Element <td> colspan=4 Attribute
Attribute Column colspan=4
" Country
List Column
<tfoot> Element © HTML Entitle
Symbol
HTML
Ampersand (&)
Semi-Colon (;) © Symbol
HTML Entitle Symbol
Table Layout
HTML Document Semantic Data
Structure Document
Style Language CSS
XHTML Browser CSS Support
CSS2.1 Internet Explorer Web
Browser Support
Web Developer Web Document Style
CSS <table> Element
Document Layout
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:35
ProfessionalWebDeveloperbyEiMaung
Formatting Elements
Text Format Element <b> Element
Bold
<i> Element (Italic)
Text Format
HTML Document Text Format Element ()
Style Detail CSS
TableofContentsandSampleChaptersPage:36
ProfessionalWebDeveloperbyEiMaung
<i>Hello, World!</i>
Hello, World!
<em>Hello, World!</em>
<i> Element <em> Element
?
" ?
<em>
Emphasis ()
<i> Element <em>
Element Semantic
HTML5 <u> Element
Formatting Elements
<b> - Bold (Example)
<i> - (Example)
<s> - Strike-through (Example)
<strong> - (Example)
<em> - (Example)
<del> - (Example)
<sup> - Superscript (Example 2nd)
<sub> - Subscript (Example H2O)
<code> - Program Code (Example)
<pre> - Format HTML Whitespace
<pre> Element Whitespace
HTML Document Program Code
Element
<blockquote> - (
)
TableofContentsandSampleChaptersPage:37
ProfessionalWebDeveloperbyEiMaung
TableofContentsandSampleChaptersPage:38
ProfessionalWebDeveloperbyEiMaung
Button
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:39
ProfessionalWebDeveloperbyEiMaung
Input Textarea Select Box
<input>
Element Textarea
<textarea> Element
<textarea> <input> Empty Element Full Element
Default Value
<input type=text> value Attribute
Default Value Tag Tag <textarea>Default Text</textarea>
Select Box Drop-Down Box
<select> Element
<option> Element
<select>
<option
<option
<option
<option
</select>
value=1>Apple</option>
value=2>Orange</option>
value=3 selected>Mango</option>
value=4>Grape</option>
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:40
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:41
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:42
ProfessionalWebDeveloperbyEiMaung
Conclusion
Element Text Document HTML Element
Element
Element Attribute
HTML5 Element
Attribute
() HTML5
HTML Document Web Application Semantic Data Structure
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:43
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:44
ProfessionalWebDeveloperbyEiMaung
CSS Syntax
CSS Programming Language Markup Language
Language
"<h2> Element Bold
<p> Element class='note' Element Size 12 Pixels
Element Style
Syntax (-)
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:45
ProfessionalWebDeveloperbyEiMaung
p {
color: green;
}
p Selector color Property green Value
CSS Selectors
CSS () Selector Element
HTML
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:46
ProfessionalWebDeveloperbyEiMaung
<ul id=nav>
<li id=key-nav> </li>
<li> </li>
<li> </li>
</ul>
<p id=highlight> </p>
<ul id=sitemap>
</ul>
<p id=foot-note> </p>
ul { background: pink; } Structure <ul> Element
Background
<ul> Element Style
ID Select
ul#nav {
background: pink;
}
(
)
#nav {
background: pink;
}
# Sign ID Selector
ul#nav "ID nav
<ul>
Element Select #nav "ID nav
Element Select
ID nav
<ul> Element Background
Structure <p> Element id=highlight
Element p#highlight (
) #highlight ID Selector
Class Selector ID Selector
Element class
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:47
ProfessionalWebDeveloperbyEiMaung
Attribute
# Sign ID Selector Dot ( . ) Class Selector
Element Structure
<p> </p>
<p class=note> </p>
<p> </p>
<p class=note> </p>
<p> Element class=note
Select
p.note {
color: gray;
font-size: 11px;
}
(
)
.note {
color: gray;
font-size: 11px;
}
ID Selector p.note "Class note
<p> Element Select
.note "Class note
Element
Select
p.note
.note
HTML Document ID Elements CSS ID Element
ID Element Identify Unique
CSS Javascript Element ID Element
Class Element Classify
Element Class Front-End
Expert CSS Element ID Class
TableofContentsandSampleChaptersPage:48
ProfessionalWebDeveloperbyEiMaung
p strong a {
color: gray;
}
p [space] strong [space] a "<p> Element
<strong> Element <a> Select Structure
Inside Link Two Element
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:49
ProfessionalWebDeveloperbyEiMaung
#header a {
text-decoration: none;
color: black;
}
#nav li a.active {
background: black;
color: white;
}
.note strong {
font-weight: normal;
color: red;
}
#footer p {
font-size: 11px;
color: gray;
}
a img {
border: 0 none;
}
Child Selector Descendant
Element
Element Select Descendant Selector Element
Element Selector Child Selector Direct Child
Element Element Element
Select Descendant Selector Element Structure
<a href=#>Outside Link</a>
<p>
<a href=#>Inside Link One</a>
<strong><a href=#>Inside Link Two</a></strong>
</p>
<p> Element <a> Element Select
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:50
ProfessionalWebDeveloperbyEiMaung
p > a {
color: gray;
}
Arrow ( > ) Child Selector "<p> Element Direct
Child <a> Element Select Selector Inside Link
One <a> Element Inside Link Two <a> Element
Direct Child <strong> Element
Child Selector Descendant Selector
Attribute Selector Element Attribute Select
Selector [title] title Attribute Element Select img[alt]
<img> Element alt Attribute Element Select
img[alt=Feature Image] <img> Element alt=Feature
Image Element Select <input> Element
text, radio, button Type type
Attribute Select
input[type=text] {
background: yellow;
border: 1px solid gray;
}
input[type=submit] {
padding: 5px 15px;
}
input[type=radio] {
margin-right: 5px;
}
Descendant Selector, Child Selector Attribute Selector
Element Select
Pseudo-classes
Pseudo-class CSS Selector
Element "
Select Element Mouse
Element Click Element Focus
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:51
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:52
ProfessionalWebDeveloperbyEiMaung
:active Pseudo-class Element Click Style
Element
Click
Element
button:active {
background: gray;
}
:focus Pseudo-class Form Input Element <input> <textarea> <select>
Element Focus
input[type=text] {
background: white;
}
input[type=text]:focus {
background: yellow;
}
<input type=text> Element
Input Element Cursor Focus
Pseudo-class Attribute Selector
:first-child Pseudo-class Select Element Element
Style :last-child Pseudo-class
:last-child Select Element Element
Style
#nav li:last-child {
border: 0 none;
}
#page p:first-child {
font-weight: bold;
}
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:53
ProfessionalWebDeveloperbyEiMaung
Grouping Selectors
Selector Group Style CSS
Rule
p.note {
background: #efefef;
font-size: 12px;
}
#footer .copyright {
background: #efefef;
font-size: 12px;
}
code {
background: #efefef;
font-size: 12px;
}
Rules
p.note, #footer .copyright, code {
background: #efefef;
font-size: 12px;
}
Selector Comma (,) Group
HTML5
CSS3 Selector Pseudo-class
CSS3 Selector () HTML5
Selector CSS
Selector jQuery Javascript Framework
Emmet (a.k.a Zen Coding) Developer Tool CSS Selector
jQuery () jQuery
Emmet () Tools and Utilities
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:54
ProfessionalWebDeveloperbyEiMaung
Background
Layout CSS Property
Element Background
CSS Background Property ()
background-color, background-image, background-repeat,
background-attachment background-position
Background Property Element
background-color Property
p {
background-color: yellow;
}
background-color Property Color Value black, white,
red, green, blue, yellow, cyan, brown, gray Color Name
Color Name
black white Name
Color Value RGB Function
Screen Red, Green, Blue
CSS RGB Value
p {
background-color: rgb(255, 255, 0);
}
<p> Element rgb() Function
Parameter Red, Green, Blue
0 255 rgb(255, 0, 0) Solid Red
Red 255 Green Blue 0
rgb(0, 255, 0) Solid Green, rgb(0, 0, 255) Solid Blue
rgb(0, 0, 0) Screen
rgb(255, 255, 255)
rgb(200, 0, 0)
Red 200
Green Blue 0
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:55
ProfessionalWebDeveloperbyEiMaung
() rgb(255, 255,
0) rgb() Primary Color
p {
background-color: #FFFF00;
}
Hex Value
# Sign
() Hexadecimal
Decimal Number system 0 9 ()
Hexadecimal 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
() Number System
Hex FF Decimal 255
Hex Value 00 FF
() FFFF00 R = FF, G = FF B = 00 Red Green
FF Green 00
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:56
ProfessionalWebDeveloperbyEiMaung
Code
Color Pick Tool ColorZilla
Firefox Addon Addon Website
Color Circle Color Code
Color Code Hex, RGB, CSS3 Color Function HSL, Print
Design CMYK
Color Name Web Developer Browser
Addon
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:57
ProfessionalWebDeveloperbyEiMaung
Developer
Background Image Size
Element " Background "
CSS
CSS3 Multiple-Background Background-Size
Browser Support
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:58
ProfessionalWebDeveloperbyEiMaung
alert.png Image
alert.png
Image <p class=alert> Element Background
p.alert {
background-image: url(alert.png);
}
background-image Property Value url() Function
url() Image File Path
TableofContentsandSampleChaptersPage:59
ProfessionalWebDeveloperbyEiMaung
Repeat background-repeat
Property
CSS
p.alert {
background-image: url(alert.png);
background-repeat: no-repeat;
}
background-repeat Property Value () repeat,
repeat-x, repeat-y no-repeat
repeat Default Value
repeat-x Image Repeat (Horizontal) repeat-y
Image Repeat (Vertical)
no-repeat Repeat
Repeat
Background
Image Position background-position Property
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:60
ProfessionalWebDeveloperbyEiMaung
p.alert {
background-image: url(alert.png);
background-repeat: no-repeat;
background-position: top right;
}
background-position Property Value Vertical Position Horizontal
Position top bottom
center
right left
center top right
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:61
ProfessionalWebDeveloperbyEiMaung
CSS Shorthand
Background Property
p.alert {
background: #FFFFDD url(alert.png) no-repeat top right;
}
background-color, background-image, background-repeat
background-position background Property Value
Value
Property
p.alert {
}
border, padding, border-radius Property Property
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:62
ProfessionalWebDeveloperbyEiMaung
h1 {
color: #224477;
text-align: center;
}
p {
color: #555;
text-align: justify;
}
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:63
ProfessionalWebDeveloperbyEiMaung
Web
Screen
text-indent Property
p {
text-indent: 50px;
}
Underline text-decoration Property
text-decoration Property Underline
<a>
Element Browser Underline
Underline text-decoration Property Value none
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
none underline text-decoration Property
Value
TableofContentsandSampleChaptersPage:64
ProfessionalWebDeveloperbyEiMaung
p {
font-family: Padauk, Maynamr3, Myanmar Text;
}
Myanmar Text Quote
Font Name Space
Quote
Myanmar Text Font Windows 8 Default
Myanmar Font
Zawgyi Font Zawgyi
Font font-family: zawgyi-one;
Zawgyi
Font
Web Standards
Web Font
Unicode Consortium
Microsoft, Apple
Operating System
Unicode Font OS Google,
Wikipedia Website Website Unicode
Web Developer
Bold (
) Bold Bold
font-weight Property font-weight: bold; Bold
font-weight: normal; Bold <h1> <h2>
<h3> Heading Element Bold
font-weight: normal;
Italic (
) Italic Italic
font-style Property font-style: italic; Italic
font-style: normal; Italic
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:65
ProfessionalWebDeveloperbyEiMaung
Size
font-size Property CSS font-size
Size Unit px, pt, in, mm, em,
% pt, in, mm Unit Screen
Screen Resolution 1in 1 inch Screen Size
() px, em %
px
Unit Size " font-size: 13px;
13px
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:66
ProfessionalWebDeveloperbyEiMaung
Structure
...
<body>
<p>
<b> </b>
</p>
</body>
<body> Element Fix Size Element Relative Unit %
body {
font-size: 16px;
}
p {
font-size: 200%;
}
p b {
font-size: 40%;
}
CSS /*
*/
/* */
em Unit
% 1.5em "" 3em
"" " " "
font-size
Size
width: 30em; Element
() width: 50%;
em %
font-size Size Border Size, Width,
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:67
ProfessionalWebDeveloperbyEiMaung
Browser Zoom-Out
Internet Explorer 6 1%
Browser px
Zoom-In/Zoom-Out
Developer
Design Decision
Unit
px Unit () Mobile Web
em %
Typography Size Balance
Balance
(-)
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:68
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:69
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:70
ProfessionalWebDeveloperbyEiMaung
word-spacing
p {
letter-spacing: -1px;
word-spacing: 4px;
}
letter-spacing -1px
Minus
Typography
Measure
()
width Property
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:71
ProfessionalWebDeveloperbyEiMaung
p {
font-size: 14px;
width: 30em;
}
(-)
TableofContentsandSampleChaptersPage:72
ProfessionalWebDeveloperbyEiMaung
Number
Bullet
Value
circle(), disc(), square(), decimal (1-2-3), lower-alpha (a-b-c),
lower-roman (i-ii-iii), upper-alpha (A-B-C), upper-roman (I-II-III)
armenian, georgian, greek Value
list-style-type <ul> disc Default <ol>
decimal Default Bullet Number
none List Bullet
none
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:73
ProfessionalWebDeveloperbyEiMaung
TableofContentsandSampleChaptersPage:74
ProfessionalWebDeveloperbyEiMaung
Document
External CSS
CSS Rule File css Extension ( style.css, layout.css, widget.css) HTML File
File File Content-Type Attribute
File Extension css Content-Type Attribute
CSS Style File
CSS File Web Document <link> Element
<link rel=stylesheet href=style.css>
<link> Element Favicon, RSS Resource
rel Attribute stylesheet href Attribute CSS File
URL Document style.css
<link> Element <head> Element
- Browser <body> Element
Style
<link> Element <head> Element
css Extension CSS Style File HTML Document
External CSS External CSS
() Style HTML Document Semantic Data Structure
CSS
() CSS Style File HTML Document
Style Reusable
Style File Style File
Document Effect
Cache
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:75
ProfessionalWebDeveloperbyEiMaung
Internal CSS
CSS HTML Document <style> Element
HTML Document Internal CSS
Document
Style External
CSS Style Reusable Internal CSS
<head> Element
<style>
body {
font-size: 16px;
line-height: 1.5em;
color: #222;
}
h1 {
font-size: 21px;
font-weight: normal;
}
</style>
<style> Element type=text/css Attribute
CSS Style Language type
Attribute Browser CSS
Inline CSS
Element style Attribute
Element
Inline CSS Element
Selector Property Value
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:76
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:77
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:78
ProfessionalWebDeveloperbyEiMaung
Element ID Class
Select Class Select
ID Select background-color:
#FFFFDD; ID Selector Class Selector Priority
Priority Selector
#nav li a {
text-decoration: underline;
}
li a {
text-decoration: none;
}
li a Selector #nav li a Selector
text-decoration: underline; Priority
!important Marker Force
#nav li a {
text-decoration: underline;
}
li a {
text-decoration: none !important;
}
Priority #nav li a li a text-decoration: none !important
Marker text-decoration: none
Display Types
HTML Element Display Type
Block Inline
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:79
ProfessionalWebDeveloperbyEiMaung
Block
<a> Element
a {
display: block;
width: 200px;
height: 40px;
text-align: center;
line-height: 40px;
text-decoration: none;
background-color: #519B7E;
color: #FFF;
border-radius: 20px;
}
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:80
ProfessionalWebDeveloperbyEiMaung
Link Button
display: block;
width height
Property border-radius Property
line-height
height
height line-height
CSS Element Horizontal Align
text-align Property
Vertical Align
Vertical Align center
Layouts
Web Document Layout Block Element
Element <div> Element <div> Element Block Element
Generic Element
Block Element Block
Element <div>
<div> Generic Element <span> Inline Element
Inline Element Element <span> Element
Layout
float Property float Property Block
(
) Property Block Element
Element float
Element (-)
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:81
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:82
ProfessionalWebDeveloperbyEiMaung
<!doctype html>
<html>
<head>
<title>CSS Layout</title>
<style>
.wrap {
width: 800px;
margin: 20px auto;
}
.header {
height: 100px;
background: #cb1212;
}
.content {
width: 600px;
height: 400px;
background: #519b7e;
float: left;
}
.sidebar {
width: 200px;
height: 400px;
background: #1635a6;
float: left;
}
.footer {
height: 60px;
background: #333;
clear: both;
}
</style>
</head>
<body>
<div class="wrap">
<div class="header"></div>
<div class="content"></div>
<div class="sidebar"></div>
<div class="footer"></div>
</div>
</body>
</html>
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:83
ProfessionalWebDeveloperbyEiMaung
Box Model
Block Element width height border, margin padding
margin Element border padding
Element Element Content (-)
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:84
ProfessionalWebDeveloperbyEiMaung
TableofContentsandSampleChaptersPage:85
ProfessionalWebDeveloperbyEiMaung
Style Color
Border Margin
margin Property
Block Top, Right, Bottom, Left margin: 20px;
20px
margin-top, margin-right, margin-bottom, margin-left
margin Value
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:86
ProfessionalWebDeveloperbyEiMaung
#content {
width: 600px;
height: 380px;
border: 4px solid #519b7e;
margin: 20px;
padding: 10px;
}
Element width: 600px;
Document 600px border: 4px solid
#519b7e; Browser Border width: 600px
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:87
ProfessionalWebDeveloperbyEiMaung
<!doctype html>
<html>
<head>
<title>CSS Drop-Down Navigation</title>
<style>
.nav, .sub {
font-family: Arial, Helvetica, sans-serif;
list-style: none;
margin: 0;
padding: 0;
}
.nav li {
background: #cb1212;
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:88
ProfessionalWebDeveloperbyEiMaung
height: 40px;
line-height: 40px;
text-align: center;
width: 160px;
}
.nav li a {
display: block;
text-decoration: none;
color: #fff;
}
.nav li a:hover {
background: #f00;
}
.nav > li {
border-right: 1px solid #f00;
float: left;
}
.sub {
display: none;
}
.nav > li:hover .sub {
display: block;
}
.sub li {
border-top: 1px solid #f00;
}
</style>
</head>
<body>
<ul class="nav">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
<li>
<a href="#">Services »</a>
<ul class="sub">
<li><a href="#">Social Media</a></li>
<li><a href="#">Web Development</a></li>
<li><a href="#">SEO</a></li>
</ul>
</li>
<li><a href="#">Products</a></li>
</ul>
</body>
</html>
HTML Structure <ul> Element Menu List
<li> Element <ul> Element Sub-Menu
Services » HTML Right Arrow Symbol ( )
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:89
ProfessionalWebDeveloperbyEiMaung
Menu
Main Menu border-left Sub Menu
border-top
Position Properties
Element Document
Regular Flow Element Regular Flow
CSS
position Property absolute top/bottom, right/left
Property
#box {
position: absolute;
top: 100px;
left: 150px; }
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:90
ProfessionalWebDeveloperbyEiMaung
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:91
ProfessionalWebDeveloperbyEiMaung
TableofContentsandSampleChaptersPage:92
ProfessionalWebDeveloperbyEiMaung
}
#box-two {
position: absolute;
top: 150px;
left: 150px;
width: 400px;
height: 280px;
background: #8a5;
z-index: 1;
opacity: 0.8;
}
#box-one z-index: 2 #box-two z-index: 1
#box-one
opacity Property Element Transparency Level
1 0 Element
0 1 Transparency Level
Conclusion
CSS CSS3, CSS
Framework, Grid System Responsive Web Design
CD Design
Template
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:93
ProfessionalWebDeveloperbyEiMaung
[ ]
http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode
http://mlmtechnological.blogspot.com
TableofContentsandSampleChaptersPage:94