Lập trình web tĩnh Html dành cho người mới bắt đầu học lập trình web Mình khuyên các bạn nên học đầy đủ từ bài số 1 trở điVà kết hợp với video khi sử dụng slide nhưng do video mình chưa có thời gia up lên khi nào có mình sẽ cho link lên mục này
Trang 1Session 5
Module 16: HTML5 Elements
Module 17: Introduction to CSS3
Trang 2Session 6 – Objectives (1)
Trang 4Evolution of Web
Technologies
Trang 5Introduction to HTML5 (1)
Trang 6Introduction to HTML5 (2)
XHTML, and the HTML DOM
most modern browsers have some HTML5 support
Trang 7New HTML5 Elements
playback
footer, header, nav, section
email, url, search
Trang 8Layout Tags (1)
Trang 9Layout Tags (1)
Trang 10Layout Tags Demo
Trang 11HTML5 Forms Elements (1)
Trang 12HTML5 Forms Elements (2)
Trang 13HTML5 Forms Elements Demo
E-mail: <input type="email" name="user_email" autofocus required /> Homepage: <input type="url" name="user_url" />
Points: <input type="number" name="points" min="1" max="10" />
Points:<input type="range" name="points_range" min="1" max="10" /> Date: <input type="date" name="user_date" />
E-mail: <input type="email" name="user_email" autofocus required /> Homepage: <input type="url" name="user_url" />
Points: <input type="number" name="points" min="1" max="10" />
Points:<input type="range" name="points_range" min="1" max="10" /> Date: <input type="date" name="user_date" />
Output on Opera
Trang 14Video on Web (1)
Trang 15<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
width="425" height="344"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,40,0">
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name=“src” value=“http://www.youtube.com/v/oHg5SJYRHA0 &hl=en&fs=1&" />
<param name="allowfullscreen" value="true" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name=“src” value=“http://www.youtube.com/v/oHg5SJYRHA0 &hl=en&fs=1&" />
<param name="allowfullscreen" value="true" />
Trang 16<audio src="song.mp3" controls="controls"></audio>
<video width="320" height="240" controls="controls">
<source src="movie.ogg" type="video/ogg" />
<source src="movie.mp4" type="video/mp4" />
<source src="movie.webm" type="video/webm" />
</video
<audio src="song.mp3" controls="controls"></audio>
<video width="320" height="240" controls="controls">
<source src="movie.ogg" type="video/ogg" />
<source src="movie.mp4" type="video/mp4" />
<source src="movie.webm" type="video/webm" />
</video
HTML5 Audio and Video
Look, so easy, so simple
Look, so easy, so simple
Trang 17Video Element Attributes
Trang 18HTML 5 Video Format
for the video element:
o Ogg = Ogg files with Thedora video codec
o Vorbis audio codecMPEG4 = MPEG 4 files with H.264 video codec and AAC audio codec.
Trang 192D and 3D Drawing
Trang 20Canvas Element
draw graphics on a Web page
every pixel of it
draw graphics on a web page
Trang 21Canvas Element Demo
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;”>Your browser does not support the canvas element.
Trang 22Introduction to CSS3
CSS is used to control the style and layout of Web pages
W3C CSS specification, from currently supported visual effects to the most cutting-edge animation techniques
Trang 24CSS3-Vendor Specific Extensions(1)
implement extensions to the CSS specifications that, in most cases, are proprietary to their browser
as adding new features for users, or for experiments and debugging
Trang 25 In order to accommodate the release of specific extensions, the CSS specifications define a specific format that vendors should follow:
vendor-o '-' + vendor specific identifier + '-' + attribute
o '_' + vendor specific identifier + '-' + attribute
Trang 26Prefix Organisation
-ms- Microsoft
mso- Microsoft Office
-moz- Mozilla Foundation (Gecko-based browsers) -o- Opera Software
-atsc- Advanced Television Standards Committee
-wap- The WAP Forum
-webkit- Safari (and other WebKit-based browsers)
CSS3-Vendor Specific Extensions(3)
Trang 27CSS3 – Borders (1)
add shadow to boxes, and use an image as a border - without using a design program, like Photoshop
o border-radius
o box-shadow
o border-image
Trang 28CSS3 – Borders (1)
Trang 31CSS3 - Border Images
/* CSS */
#round
{
border-width:15px; width:250px; padding:10px 20px;
-moz-border-image:url(border.png) 30 30 round; /* Firefox */
-webkit-border-image:url(border.png) 30 30 round; /* Safari and Chrome */
border-width:15px; width:250px; padding:10px 20px;
-moz-border-image:url(border.png) 30 30 round; /* Firefox */
-webkit-border-image:url(border.png) 30 30 round; /* Safari and Chrome */
Trang 33CSS3 - Web Fonts
that were already installed on the user's computer
using CSS3 @font-face rule
Trang 34CSS3 - Web Fonts Demo
Trang 36CSS3 Text Shadow Demo
Trang 37CSS3 Word Wrapping Demo
gword The long word will brake
and wrap to the next line.</p>
gword The long word will brake
and wrap to the next line.</p>
Output
Trang 38CSS3 - Multiple Columns
columns for laying out text - like in newspapers
o column-count
o column-gap
o column-rule
Trang 39CSS3 - Multiple Columns Demo
Output
Trang 40CSS3 - Transformations
move, scale, turn, spin, and stretch elements
Trang 41The translate() Method
from its current position, depending on the parameters given for the left (X-axis) and the top (Y-axis) position
the element 50 pixels from the left, and 100 pixels from the top
Trang 42The translate() Method Demo
Trang 43The rotate() Method
clockwise at a given degree Negative values are allowed and rotates the element counter-clockwise
element clockwise 30 degrees
Trang 44The rotate() Method Demo
/* CSS */
div
{
margin:10px; width:100px; height:75px;
background:lavender; border:1px solid black;
margin:10px; width:100px; height:75px;
background:lavender; border:1px solid black;
Trang 45The scale() Method
decreases the size of an element
be twice its original size, and the height 4 times its original size
Trang 46The scale() Method Demo
Trang 47The skew() Method
angle, depending on the parameters given for the horizontal (X-axis) and the vertical (Y-axis) lines
element 30 degrees around the X-axis, and 20 degrees around the Y-axis
Trang 48The skew() Method Demo
Trang 49CSS3 - Animations (1)
can replace animated images, Flash animations, and JavaScripts in many web pages
appearance of an element in the browser by translating, rotating or other means
animation
Trang 50CSS3 - Animations (2)
Trang 51CSS3 - Animations Demo
/* CSS in Safari and Chrome */
@-webkit-keyframes myfirst {
from {background: red;}
to {background: yellow;}
}
#box {
width:100px; height:100px; background:red;
from {background: red;}
to {background: yellow;}
}
#box {
width:100px; height:100px; background:red;
Trang 52Session 5 - Summary (1)
XHTML, and the HTML DOM
o Semantics (Layout tags, Link Relations…)
o Web Forms 2.0 (Input Fields)
o Multimedia (Audio Tag, Video Tag)
Trang 53Session 5 - Summary (2)
W3C CSS specification with new visual effects and animation techniques