ActiveNET - HTML CSS JavaScript - 2017
ActiveNET - HTML CSS JavaScript - 2017
ActiveNET ®
HTML, CSS,
JavaScript
Hyper Text Markup Language, Cascading Style Sheet
By Suryanarayana
HTML
Introduction to HTML (Hyper Text Markup Language)
As all of us know HTML meant for Web Page Designing, but initially it is developed for rich
formatting the text. Means if we want to prepare a new paper, project report, marks list etc
we used to use MS-Word software to prepare Rich Text Documents, saved as a .doc/docx
extension. The Word documents are having following limitations. (Rich Text Publishing
Software’s are MSWord, StarOffice, SOT Office, Open Office, Polaris Office).
Limitations are:
• Standalone (can be opened and run on the same machine).
• Software dependent (can be prepared and opened on MS-Word software only).
• No link between documents (MS-Word documents cannot be linked though they are
on the same machine.
The intention of the inventor is the same kind of Rich Text Formatting want to be prepared
and run on MS-Office kind of software independent manner. If we format the text by placing
in open and end tag, prepared on notepad, saved as .html extension file and opened on
browser. No tool is need to prepare HTML document and can run on any web browser. If
published on www server, it can be accessed from anywhere on WWW. One document can be
hyperlinked to another document running on the same server or on a different server.
About HTML
HTML is developed by Tim Berners Lee, a contractor at CERN. In 1989 Lee wrote a proposal on
Internet based hyper text system. Lee wrote a browser called MOSAIC in 1990. Other browsers are
Netscape Navigator, Internet Explorer, Safari, Goolge Chrome, Firefox, Opera are few.
Hyper Text means highlighted text means text which is underlined and looking in a different color. If we
click on it, it redirects us to another location – shortly I say hyperlink.
And marking up text mean, in office documents we will format text using options given in toolbar. We will
save document and distribute it to others. If other want to open and see the document that system again
needs Office software. This is first and another thing is the document belongs to the same system but not
available all over the network.
Hence HTML came as an alternative to word documents. In HTML if we place text in between start and end
tags the text automatically formatted by browser by understanding tags as markup. The document can be
published on WWW server and can be opened on any browser. That is how it is a markup language.
• HTML is a text formatting language for preparing web documents that runs on browser.
• HTML formats text, hyperlinks text and it tells browser to render media content.
• The first version of HTML is HTML 4.0 published on 18th December 1997 and revised in 24th April
1998.
HTML was originally developed by Tim-Berners-Lee while at CERN and popularized Mosaic browser
developed at NCSA.
• First HTML release in 1993
• HTML 2 - Nov 1995
• HTML 3.2 – Jan 1997
• Later HTML 4.0.1 – Dec 1997
HTML Tags
• It contains tag for the beginning and ending of HTML document – <HTML>
• Structure tags – <HEAD>, <BODY>, <FRAMESET>
• HEAD tags – TITLE, META, STYLE, LINK, SCRIPT
• BODY Sub tags
o Text formatting tags – B, I, EM, UNDERLINE, BLINK, MARQUEE, SUP, SUB
o Heading tags – H1, H2, H3, H4, H5, H6
o Link tags – A, AREA, MAP
o Image tags – IMG
o Menu tags – UL, OL, LI
o Frame tags - FRAMESET, FRAME
o Font Tags – FONT
o Grouping tags – FIELDSET, LEGEND
o Form tags – FORM, INPUT, TEXTAREA, SELECT, OPTION
o Plug-in tags – OBJECT, APPLET, EMBED
o Container Tags/BOX Elements – P, DIV, SPAN
o Table tags – TABLE, TTITLE, THEAD, TFOOTER, TR, TH, TD
<strong>, <style>, <sub>, <summary>, <sup>, <table>, <tbody>, <td>, <template>, <textarea>, <tfoot>, <th>,
<thead>, <time>, <title>, <tr>, <track>, <u>, <ul>, <var>, <video>, <wbr>
11. <base> Specifies a base URL for all the links in a page
38. <figure> Specifies a group of media content, and their caption New
63. <main> Specifies the main content area of an HTML document. New
67. <menuitem> Specifies a command that a user can invoke from a popup menu. HTML 5.1
98. <template> Declares HTML fragments that can be cloned and inserted in the New
document by script.
106. <track> Specifies a text track for media such as video and audio New
111. <wbr> Specifies a line break opportunity for very long words and strings New
of text with no spaces.
abbr_2.html
The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.
address_3.html
<address>
Visit us at:<br>
</address>
area_4.html
<map name="planetmap">
</map>
article_5.html
<article>
<h1>Google Chrome</h1>
<p>Google Chrome is a free, open-source web browser developed by Google, released in 2008.</p>
</article>
aside_6.html
<aside>
<h4>Epcot Center</h4>
</aside>
audio_7.html
<audio controls>
</audio>
b_8.html
base_9.html
<head>
</head>
<body>
<a href="https://www.w3schools.com">W3Schools</a>
</body>
bdi_10.html
<ul>
</ul>
bdo_11.html
<bdo dir="rtl">
</bdo>
blockquote_12.html
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF
works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
</blockquote>
body_13.html
<html>
<head>
</head>
<body>
</body>
</html>
br_14.html
button_15.html
canvas_16.html
</canvas>
<!-- Line -->
var c = document.getElementById("myCanvas");
ctx.moveTo(0,0);
ctx.lineTo(200,100);
ctx.stroke();
var c = document.getElementById("myCanvas");
ctx.beginPath();
ctx.arc(95,50,40,0,2*Math.PI);
ctx.stroke();
var c = document.getElementById("myCanvas");
ctx.fillText("Hello World",10,50);
var c = document.getElementById("myCanvas");
ctx.strokeText("Hello World",10,50);
var c = document.getElementById("myCanvas");
// Create gradient
grd.addColorStop(0,"red");
grd.addColorStop(1,"white");
ctx.fillStyle = grd;
ctx.fillRect(10,10,150,80);
var c = document.getElementById("myCanvas");
// Create gradient
grd.addColorStop(0,"red");
grd.addColorStop(1,"white");
ctx.fillStyle = grd;
ctx.fillRect(10,10,150,80);
<body>
<p>Image to use:</p>
<p>Canvas to fill:</p>
<script>
function myCanvas() {
var c = document.getElementById("myCanvas");
ctx.drawImage(img,10,10);
</script>
caption_17.html
<table>
<caption>Monthly savings</caption>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
cite_18.html
code_19.html
<body>
<em>Emphasized text</em><br>
<strong>Strong text</strong><br>
<kbd>Keyboard input</kbd><br>
<var>Variable</var>
</body>
col_20.html
<table>
<colgroup>
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>$53</td>
</tr>
</table>
colgroup_21.html
<table>
<colgroup>
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>$53</td>
</tr>
</table>
data_22.html
<ul>
</ul>
datalist_23.html
<input list="browsers">
<datalist id="browsers">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
dd_24.html
<dl>
<dt>Coffee</dt>
<dt>Milk</dt>
</dl>
del_25.html
details_26.html
<details>
<summary>Copyright 1999-2014.</summary>
<p>All content and graphics on this web site are the property of the company Refsnes Data.</p>
</details>
dfn_27.html
dialog_28.html
<table>
<tr>
<th>February</th>
<th>March</th>
</tr>
<tr>
<td>31</td>
<td>28</td>
<td>31</td>
</tr>
</table>
div_29.html
<div style="color:#0000FF">
<h3>This is a heading</h3>
<p>This is a paragraph.</p>
</div>
dl_30.html
<dl>
<dt>Coffee</dt>
<dt>Milk</dt>
</dl>
em_31.html
<em>Emphasized text</em>
embed_32.html
<embed src="helloworld.swf">
fieldset_33.html
<form>
<fieldset>
<legend>Personalia:</legend>
</fieldset>
</form>
figcaption_34.html
<figure>
</figure>
figure_35.html
<figure>
</figure>
footer_36.html
<footer>
[email protected]</a>.</p>
</footer>
form_37.html
</form>
h1_38.html
head_39.html
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
header_40.html
<article>
<header>
</header>
</article>
hgroup_41.html
<hgroup id="document-title">
<h1>HTML</h1>
</hgroup>
hr_42.html
<h1>HTML</h1>
<hr>
<h1>CSS</h1>
i_43.html
<p>He named his car <i>The lightning</i>, because it was very fast.</p>
iframe_44.html
<iframe src="http://www.activenetinformatics.com"></iframe>
img_45.html
input_46.html
<form action="/action_page.php">
</form>
ins_47.html
kbd_48.html
<kbd>Keyboard input</kbd>
keygen_49.html
<input type="submit">
</form>
label_50.html
<form action="/action.jsp">
<label for="male">Male</label>
<label for="female">Female</label>
<label for="other">Other</label>
</form>
li_51.html
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
link_52.html
<head>
</head>
main_53.html
<main>
<h1>Web Browsers</h1>
<p>Google Chrome, Firefox, and Internet Explorer are the most used browsers today.</p>
<article>
<h1>Google Chrome</h1>
released in 2008.</p>
</article>
<article>
<h1>Internet Explorer</h1>
</article>
<article>
<h1>Mozilla Firefox</h1>
</article>
</main>
mark_54.html
menu_55.html
</menu>
</menu>
</div>
<p>This example currently only works in Firefox!</p>
meta_56.html
<head>
<meta charset="UTF-8">
</head>
meter_57.html
<meter value="0.6">60%</meter>
nav_58.html
<nav>
<a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
<a href="/js/">JavaScript</a> |
<a href="/jquery/">jQuery</a>
</nav>
noscript_59.html
<script>
document.write("Hello World!")
</script>
<p>A browser without support for JavaScript will show the text inside the noscript element.</p>
object_60.html
ol_61.html
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
optgroup_62.html
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
option_63.html
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
output_64.html
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
</form>
p_65.html
param_66.html
<object data="horse.wav">
</object>
pre_67.html
<pre>
is displayed in a fixed-width
line breaks
</pre>
progress_68.html
q_69.html
s_70.html
script_71.html
<!DOCTYPE html>
<html>
<head>
<script>
</script>
</head>
<body>
<p id="demo"></p>
</body>
</html>
section_72.html
<section>
<h1>WWF</h1>
</section>
small_73.html
span_74.html
<p>My mother has <span style="color:blue;font-weight:bold">blue</span> eyes and my father has <span
style="color:darkolivegreen;font-weight:bold">dark green</span> eyes.</p>
style_75.html
<head>
<style>
h1 {color:red;}
p {color:blue;}
</style>
</head>
<body>
<h1>A heading</h1>
<p>A paragraph.</p>
</body>
sub_sup_76.html
table_77.html
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
tbody_78.html
<table>
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
</table>
td_79.html
<table>
<tr>
<td>Cell A</td>
<td>Cell B</td>
</tr>
</table>
textarea_80.html
<input type="submit">
</form>
th_81.html
<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
time_82.html
title_83.html
<head>
<title>HTML Reference</title>
</head>
track_84.html
</video>
u_85.html
<p>This is a <u>parragraph</u>.</p>
ul_86.html
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
video_87.html
</video>
wbr_88.html
<p>Try to shrink the browser window, to view how the very long word in
<p>This is a
veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryvery<wbr>longwordthatwillbreakatspecifi
c<wbr>placeswhenthebrowserwindowisresized.</p>
CSS
(369 Properties)
Introduction to CSS
• CSS – Stands for Cascading Style Sheet
• CSS describe how HTML tags/elements want to be displayed/rendered on browser
• CSS reduces lot of work by writing in a singe css file and adding it into multiple HTML pages.
• CSS stored as a .css extension file in a external file and included in HTML file <link> tag.
• CSS properties are cross compatible all the devices such as desktop web browsers, mobiles,
tables and TVs.
• CSS is platform independent.
These ratified specifications are called recommendations because the W3C has no control over
the actual implementation of the language. Independent companies and organizations create
that software.
NOTE − The World Wide Web Consortium, or W3C is a group that makes recommendations
about how the Internet works and how it should evolve.
CSS Versions
Cascading Style Sheets, level 1 (CSS1) was came out of W3C as a recommendation in December 1996.
This version describes the CSS language as well as a simple visual formatting model for all the HTML
tags.
CSS2 was became a W3C recommendation in May 1998 and builds on CSS1. This version adds support
for media-specific style sheets e.g. printers and aural devices, downloadable fonts, element positioning
and tables.
CSS3 was became a W3C recommendation in June 1999 and builds on older versions CSS. it has divided
into documentations is called as Modules and here each module having new extension features
defined in CSS2.
CSS3 Modules
CSS3 Modules are having old CSS specifications as well as extension features.
• Selectors
• Box Model
• Backgrounds and Borders
• Image Values and Replaced Content
• Text Effects
• 2D/3D Transformations
• Animations
• Multiple Column Layout
• User Interface
Color Properties: 2
color, opacity
Background and Border Properties: 43
background, background-attachment, background-blend-mode, background-color, background-image,
background-position, background-repeat, background-clip, background-origin, background-size, border,
border-bottom, border-bottom-color, border-bottom-left-radius, border-bottom-right-radius, border-
bottom-style, border-bottom-width, border-color, border-image, border-image-outset, border-image-
repeat, border-image-slice, border-image-source, border-image-width, border-left, border-left-color,
border-left-style, border-left-width, border-radius, border-right, border-right-color, border-right-style,
border-right-width, border-style, border-top, border-top-color, border-top-left-radius, border-top-right-
radius, border-top-style, border-top-width, border-width, box-decoration-break, box-shadow
Basic Box Properties: 31
bottom, clear, clip, display, float, height, left, margin, margin-bottom, margin-left, margin-right, margin-
top, max-height, max-width, min-height, min-width, overflow, overflow-x, overflow-y, padding, padding-
bottom, padding-left, padding-right, padding-top, position, right, top, visibility, width, vertical-align, z-
index
Flexible Box Layout Properties: 12
align-content, align-items, align-self, flex, flex-basis, flex-direction, flex-flow, flex-grow, flex-shrink, flex-
wrap, justify-content, order
Text Properties: 17
hanging-punctuation, hyphens, letter-spacing, line-break, line-height, overflow-wrap, tab-size, text-align,
text-align-last, text-combine-upright, text-indent, text-justify, text-transform, white-space, word-break,
word-spacing, word-wrap
Text Decoration Properties: 6
text-decoration, text-decoration-color, text-decoration-line, text-decoration-style, text-shadow, text-
underline-position
Font Properties: 20
@font-face, @font-feature-values, font, font-family, font-feature-settings, font-kerning, font-language-
override, font-size, font-size-adjust, font-stretch, font-style, font-synthesis, font-variant, font-variant-
alternates, font-variant-caps, font-variant-east-asian, font-variant-ligatures, font-variant-numeric, font-
variant-position, font-weight
Writing Mode Properties: 6
direction, text-orientation, text-combine-upright, unicode-bidi, user-select, writing-mode
Table Properties: 5
border-collapse, border-spacing, caption-side, empty-cells, table-layout
Lists & Counters Properties: 6
counter-increment, counter-reset, list-style, list-style-image, list-style-position, list-style-type
Animation Properties: 10
@keyframes, animation, animation-delay, animation-direction, animation-duration, animation-fill-
mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function
Transform Properties: 6
backface-visibility, perspective, perspective-origin, transform, transform-origin, transform-style
Transition Properties: 5
transition, transition-property, transition-duration, transition-timing-function, transition-delay
Basic UI Properties: 16
box-sizing, content, cursor, ime-mode, nav-down, nav-index, nav-left, nav-right, nav-up, outline, outline-
color, outline-offset, outline-style, outline-width, resize, text-overflow
Multi Column Layout Properties: 14
background A shorthand property for setting all the background properties in one 1
declaration
background- Sets whether a background image is fixed or scrolls with the rest of the page 1
attachment
border-image-outset Specifies the amount by which the border image area extends beyond the 3
border box
border-radius A shorthand property for setting all the four border-*-radius properties 3
box-decoration-break Sets the behaviour of the background and border of an element at page- 3
break, or, for in-line elements, at line-break.
clear Specifies which sides of an element where other floating elements are not allowed 1
overflow-x Specifies whether or not to clip the left/right edges of the content, if it overflows 3
the element's content area
overflow-y Specifies whether or not to clip the top/bottom edges of the content, if it overflows 3
the element's content area
position Specifies the type of positioning method used for an element (static, relative, 2
absolute or fixed)
align-content Specifies the alignment between the lines inside a flexible container when the items 3
do not use all available space
align-self Specifies the alignment for selected items inside a flexible container 3
flex-flow A shorthand property for the flex-direction and the flex-wrap properties 3
flex-grow Specifies how much the item will grow relative to the rest 3
flex-shrink Specifies how the item will shrink relative to the rest 3
justify- Specifies the alignment between the items inside a flexible container when the items 3
content do not use all available space
order Sets the order of the flexible item, relative to the rest 3
Text Properties
Property Description CSS
hanging- Specifies whether a punctuation character may be placed outside the line box 3
punctuation
overflow-wrap Specifies whether or not the browser may break lines within words in order to 3
prevent overflow (when a string is too long to fit its containing box)
text-align-last Describes how the last line of a block or a line right before a forced line break is 3
aligned when text-align is "justify"
text-combine- Specifies the combination of multiple characters into the space of a single character 3
upright
word-wrap Allows long, unbreakable words to be broken and wrap to the next line 3
text-underline- Specifies the position of the underline which is set using the text- 3
position decoration property
Font Properties
@font-face A rule that allows websites to download and use fonts other than the "web-safe" 3
fonts
font-kerning Controls the usage of the kerning information (how letters are spaced) 3
font-synthesis Controls which missing typefaces (bold or italic) may be synthesized by the 3
browser
font-variant- Controls the usage of alternate glyphs associated to alternative names defined in 3
alternates @font-feature-values
font-variant-east- Controls the usage of alternate glyphs for East Asian scripts (e.g Japanese and 3
asian Chinese)
font-variant- Controls which ligatures and contextual forms are used in textual content of the 3
ligatures elements it applies to
font-variant- Controls the usage of alternate glyphs for numbers, fractions, and ordinal 3
numeric markers
font-variant- Controls the usage of alternate glyphs of smaller size positioned as superscript or 3
position subscript regarding the baseline of the font
text-combine- Specifies the combination of multiple characters into the space of a single character 3
upright
unicode-bidi Used together with the direction property to set or return whether the text should be 2
overridden to support multiple languages in the same document
writing-mode 3
Table Properties
Property Description CSS
list-style-position Specifies if the list-item markers should appear inside or outside the 1
content flow
Animation Properties
Property Description CSS
animation-fill-mode Specifies a style for the element when the animation is not playing 3
(when it is finished, or when it has a delay)
Transform Properties
Property Description CSS
backface-visibility Defines whether or not an element should be visible when not facing 3
the screen
Transitions Properties
Property Description CSS
transition-property Specifies the name of the CSS property the transition effect is for 3
box-sizing Tells the browser what the sizing properties (width and height) should 3
include
content Used with the :before and :after pseudo-elements, to insert generated 2
content
ime-mode Controls the state of the input method editor for text fields 3
nav-down Specifies where to navigate when using the arrow-down navigation key 3
nav-left Specifies where to navigate when using the arrow-left navigation key 3
nav-right Specifies where to navigate when using the arrow-right navigation key 3
nav-up Specifies where to navigate when using the arrow-up navigation key 3
text-overflow Specifies what should happen when text overflows the containing 3
element
break-after Specifies the page-, column-, or region-break behavior after the generated 3
box
break-before Specifies the page-, column-, or region-break behavior before the generated 3
box
break-inside Specifies the page-, column-, or region-break behavior inside the generated 3
box
widows Sets the minimum number of lines that must be left at the top of a page when 2
a page break occurs inside an element
Paged Media
Property Description CSS
orphans Sets the minimum number of lines that must be left at the bottom of a page 2
when a page break occurs inside an element
filter Defines effects (e.g. blurring or color shifting) on an element before the 3
element is displayed
image- Specifies a rotation in the right or clockwise direction that a user agent applies to 3
orientation an image (This property is likely going to be deprecated and its functionality moved
to HTML)
image- Gives a hint to the browser about what aspects of an image are most important to 3
rendering preserve when the image is scaled
image- Specifies the intrinsic resolution of all raster images used in/on the element 3
resolution
object-fit Specifies how the contents of a replaced element should be fitted to the box 3
established by its used height and width
object- Specifies the alignment of the replaced element inside its box 3
position
Masking Properties
Property Description CSS
mask 3
mask-type 3
Speech Properties
Property Description CSS
Rest A shorthand property for setting the rest-before and rest-after properties 3
voice-duration Specifies how long it should take to render the selected element's content 3
Marquee Properties
CSS Examples
Color Properties: 2
color, opacity
Color_1.html
<style>
body {
color: red;
}
h1 {
color: #00ff00;
}
p.ex {
color: rgb(0,0,255);
}
</style>
</head>
<body>
<h1>This is heading 1</h1>
<p>This is an ordinary paragraph. Notice that this text is red. The default text-color for a page is
defined in the body selector.</p>
<p class="ex">This is a paragraph with class="ex". This text is blue.</p>
</body>
Opacity_2.html
<!DOCTYPE html>
<html>
<head>
<style>
img {
opacity: 0.5;
filter: alpha(opacity=50); /* For IE8 and earlier */
}
</style>
</head>
<body>
<h1>Image Transparency</h1>
<p>The opacity property specifies the transparency of an element. The lower the value, the more
transparent:</p>
<p>Image with 50% opacity:</p>
<img src="img_forest.jpg" alt="Forest" width="170" height="100">
</body>
</html>
Opacity_Hover_3.html
<!DOCTYPE html>
<html>
<head>
<style>
img {
opacity: 0.5;
filter: alpha(opacity=50); /* For IE8 and earlier */
}
img:hover {
opacity: 1.0;
filter: alpha(opacity=100); /* For IE8 and earlier */
}
</style>
</head>
<body>
<h1>Image Transparency</h1>
<p>The opacity property is often used together with the :hover selector to change the opacity on
mouse-over:</p>
<img src="img_forest.jpg" alt="Forest" width="170" height="100">
<img src="img_mountains.jpg" alt="Mountains" width="170" height="100">
<img src="img_fjords.jpg" alt="Fjords" width="170" height="100">
<p><b>Note:</b> In IE, a !DOCTYPE must be added for the :hover selector to work on other elements
than the a element.</p>
</body>
</html>
Background and Border Properties: 43
background, background-attachment, background-blend-mode, background-color, background-image,
background-position, background-repeat, background-clip, background-origin, background-size, border,
Background_color_5.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: yellow;
}
h1 {
background-color: #00ff00;
}
p{
background-color: rgb(255,0,255);
}
</style>
</head>
<body>
<h1>This is heading 1</h1>
<p>This is a paragraph.</p>
</body>
</html>
Background_image_6.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("paper.gif");
background-color: #cccccc;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
Background_position_7.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url('smiley.gif');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
}
</style>
</head>
<body>
</body>
</html>
Background_size_8.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: url("img_flwr.gif");
Background_repeat_9.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("paper.gif");
background-repeat: repeat-y;
}
</style>
</head>
<body>
<p>repeat-y will repeat a background image only vertically.</p>
</body>
</html>
Background_origin_10.html
<!DOCTYPE html>
<html>
<head>
<style>
#example1 {
border: 10px solid black;
padding: 35px;
background: url(img_flwr.gif);
background-repeat: no-repeat;
}
#example2 {
border: 10px solid black;
padding: 35px;
background: url(img_flwr.gif);
background-repeat: no-repeat;
background-origin: border-box;
}
#example3 {
border: 10px solid black;
padding: 35px;
background: url(img_flwr.gif);
background-repeat: no-repeat;
background-origin: content-box;
}
</style>
</head>
<body>
<p>No background-origin (padding-box is default):</p>
<div id="example1">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt
ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
ex ea commodo consequat.</p>
</div>
<p>background-origin: border-box:</p>
<div id="example2">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt
ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
ex ea commodo consequat.</p>
</div>
<p>background-origin: content-box:</p>
<div id="example3">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt
ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
ex ea commodo consequat.</p>
</div>
</body>
</html>
Background_clip_11.html
<!DOCTYPE html>
<html>
<head>
<style>
#example1 {
border: 10px dotted black;
padding: 35px;
background: yellow;
}
#example2 {
border: 10px dotted black;
padding: 35px;
background: yellow;
background-clip: padding-box;
}
#example3 {
border: 10px dotted black;
padding: 35px;
background: yellow;
background-clip: content-box;
}
</style>
</head>
<body>
<p><strong>Note:</strong> The background-clip property is not supported in Internet Explorer 8 and
earlier versions.</p>
<p>No background-clip (border-box is default):</p>
<div id="example1">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt
ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
<p>background-clip: padding-box:</p>
<div id="example2">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt
ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
<p>background-clip: content-box:</p>
<div id="example3">
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt
ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
</body>
</html>
Background_attachment_12.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url('w3css.gif');
background-repeat: no-repeat;
background-attachment: fixed;
}
</style>
</head>
<body>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>The background-image is fixed. Try to scroll down the page.</p>
<p>If you do not see any scrollbars, try to resize the browser window.</p>
</body>
</html>
Border_13.html
<!- -
The border shorthand property sets all the border properties in one declaration.
The properties that can be set, are (in order): border-width, border-style, and border-color.
Syntax:
border: border-width border-style border-color;
border-width: medium|thin|thick
border-
style:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset
;
border-color: color|transparent;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
border: 5px solid red;
}
</style>
</head>
<body>
<p>This is some text in a paragraph.</p>
</body>
</html>
Border_Width_14.html
<!DOCTYPE html>
<html>
<head>
<style>
p.one {
border-style: solid;
border-width: 5px;
}
p.two {
border-style: solid;
border-width: medium;
}
p.three {
border-style: solid;
border-width: 1px;
}
</style>
</head>
<body>
<p class="one">Some text.</p>
<p class="two">Some text.</p>
<p class="three">Some text.</p>
<p><b>Note:</b> The "border-width" property does not work if it is used alone. Use the "border-style"
property to set the borders first.</p>
</body>
</html>
Border_Style_15.html
<!DOCTYPE html>
<html>
<head>
<style>
p.none {border-style: none;}
p.dotted {border-style: dotted;}
p.dashed {border-style: dashed;}
p.solid {border-style: solid;}
p.double {border-style: double;}
p.groove {border-style: groove;}
p.ridge {border-style: ridge;}
p.inset {border-style: inset;}
p.outset {border-style: outset;}
p.hidden {border-style: hidden;}
</style>
</head>
<body>
<p class="none">No border.</p>
<p class="dotted">A dotted border.</p>
<p class="dashed">A dashed border.</p>
<p class="solid">A solid border.</p>
<p class="double">A double border.</p>
<p class="groove">A groove border.</p>
<p class="ridge">A ridge border.</p>
<p class="inset">An inset border.</p>
<p class="outset">An outset border.</p>
<p class="hidden">A hidden border.</p>
</body>
</html>
Border_Color_16.html
<!DOCTYPE html>
<html>
<head>
<style>
p.one {
border-style: solid;
border-color: #0000ff;
}
p.two {
border-style: solid;
border-color: #ff0000 #0000ff;
}
p.three {
border-style: solid;
border-color: #ff0000 #00ff00 #0000ff;
}
p.four {
border-style: solid;
border-color: #ff0000 #00ff00 #0000ff rgb(250,0,255);
}
</style>
</head>
<body>
<p class="one">One-colored border!</p>
<p class="two">Two-colored border!</p>
<p class="three">Three-colored border!</p>
<p class="four">Four-colored border!</p>
<p><b>Note:</b> The "border-color" property does not work if it is used alone. Use the "border-style"
property to set the borders first.</p>
</body>
</html>
Border_radius_17.html
<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 2px solid #a1a1a1;
padding: 10px 40px;
background: #dddddd;
width: 300px;
border-radius: 15px 5px 25px 35px;
}
</style>
</head>
<body>
<div>The border-radius property allows you to add rounded corners to elements.</div>
</body>
</html>
Box_shadow_18.html
<!- -
The box-shadow property attaches one or more shadows to an element.
Syntax:
box-shadow: none|h-shadow v-shadow blur spread color|inset
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 300px;
height: 100px;
background-color: yellow;
box-shadow: 10px 10px 5px #888888;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins,
borders, padding, and the actual content. The image below illustrates the box model:
The box model allows us to add a border around elements, and to define space between elements.
Box_model_19.html
<head>
<style>
div {
background-color: lightgrey;
width: 300px;
border: 25px solid green;
padding: 25px;
margin: 25px;
}
</style>
</head>
<body>
<h2>Demonstrating the Box Model</h2>
<p>The CSS box model is essentially a box that wraps around every HTML element. It consists of:
borders, padding, margins, and the actual content.</p>
<div>This text is the actual content of the box. We have added a 25px padding, 25px margin and a 25px
green border. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.</div>
</body>
Width and Height of an Element
In order to set the width and height of an element correctly in all browsers, you need to know how the
box model works.
Important: When you set the width and height properties of an element with CSS, you just set the width
and height of the content area. To calculate the full size of an element, you must also add padding,
borders and margins.
Assume we want to style a <div> element to have a total width of 350px:
Box_Width_20.html
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 320px;
padding: 10px;
border: 5px solid gray;
margin: 0;
}
</style>
</head>
<body>
<h2>Calculate the total width:</h2>
<img src="klematis4_big.jpg" width="350" height="263" alt="Klematis">
<div>The picture above is 350px wide. The total width of this element is also 350px.</div>
</body>
</html>
Here is the math:
320px (width)
+ 20px (left + right padding)
Total element width = width + left padding + right padding + left border + right border + left margin +
right margin
Total element height = height + top padding + bottom padding + top border + bottom border + top
margin + bottom margin
Note for old IE: Internet Explorer 8 and earlier versions, include padding and border in the width
property. To fix this problem, add a <!DOCTYPE html> to the HTML page.
Box_bottom_21.html
<!- -
Set the bottom edge of the absolute positioned <div> element to 70px above the bottom edge of its
nearest positioned ancestor:
Syntax:
bottom:auto|length;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div.relative {
position: relative;
width: 400px;
height: 200px;
border: 3px solid #8AC007;
}
div.absolute {
position: absolute;
bottom: 70px;
width: 200px;
height: 100px;
border: 3px solid #8AC007;
}
</style>
</head>
<body>
<div class="relative">This div element has position: relative;
<div class="absolute">This div element has position: absolute. It is placed 70 pixels above the bottom
edge of the containing positioned element (div with class="relative").</div>
</div>
</body>
</html>
Box_clear_22.html
<!- -
No floating elements allowed on the left or the right side of a specified <p> element:
Syntax:
clear:none|left|right|both;
-->
<!DOCTYPE html>
<html>
<head>
<style>
img {
float: left;
}
p.clear {
clear: both;
}
</style>
</head>
<body>
<img src="logocss.gif" width="95" height="84">
<p>This is some text. This is some text. This is some text. This is some text. This is some text. This is
some text.</p>
<p class="clear">This is also some text. This is also some text. This is also some text. This is also some
text. This is also some text. This is also some text.</p>
<p><strong>Remove the "clear" class to see the effect.</strong></p>
</body>
</html>
Box_clip_23.html
<!- -
What happens if an image is larger than its containing element? - The clip property lets you specify a
rectangle to clip an absolutely positioned element. The rectangle is specified as four coordinates, all
from the top-left corner of the element to be clipped.
Box_display_24.html
<!- -
The display property specifies the type of box used for an HTML element.
Syntax:
display:inline|block|flex|inline-block|inline-flex|inline-table|list-item|run-in|table|table-
caption|table-column-group|table-header-group|table-footer-group|table-row-group|table-cell|table-
column|table-row|none|intial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
display: inline;
}
</style>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
Box_float_25.html
<!- -
The float property specifies whether or not an element should float.
The clear property is used to control the behavior of floating elements.
float property
In its simplest use, the float property can be used to wrap text around images.
The following example specifies that an image should float to the right in a text:
-->
<!DOCTYPE html>
<html>
<head>
<style>
img {
float: right;
margin: 0 0 10px 10px;
}
</style>
</head>
<body>
<p>In this example, the image will float to the right in the paragraph, and the text in the paragraph will
wrap around the image.</p>
<p><img src="w3css.gif" alt="W3Schools.com" width="100" height="140">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus imperdiet, nulla et dictum interdum,
nisi lorem egestas odio, vitae scelerisque enim ligula venenatis dolor. Maecenas nisl est, ultrices nec
congue eget, auctor vitae massa. Fusce luctus vestibulum augue ut aliquet. Mauris ante ligula, facilisis
sed ornare eu, lobortis in odio. Praesent convallis urna a lacus interdum ut hendrerit risus congue. Nunc
sagittis dictum nisi, sed ullamcorper ipsum dignissim ac. In at libero sed nunc venenatis imperdiet sed
ornare turpis. Donec vitae dui eget tellus gravida venenatis. Integer fringilla congue eros non
fermentum. Sed dapibus pulvinar nibh tempor porta. Cras ac leo purus. Mauris quis diam velit.</p>
</body>
</html>
Box_clear_26.html
<!- -
clear property
The clear property is used to control the behavior of floating elements.
Elements after a floating element will flow around it. To avoid this, use the clearproperty.
The clear property specifies on which sides of an element floating elements are not allowed to float:
-->
<!DOCTYPE html>
<html>
<head>
<style>
.div1 {
float: left;
width: 100px;
height: 50px;
margin: 10px;
border: 3px solid #73AD21;
}
div2 {
border: 1px solid red;
}
.div3 {
float: left;
width: 100px;
height: 50px;
margin: 10px;
border: 3px solid #73AD21;
}
.div4 {
border: 1px solid red;
clear: left;
}
</style>
</head>
<body>
<h2>Without clear</h2>
<div class="div1">div1</div>
<div class="div2">div2 - Notice that the div2 element is after div1, in the HTML code. However, since
div1 is floated to the left, this happens: the text in div2 is floated around div1, and div2 surrounds the
whole thing.</div>
<h2>Using clear</h2>
<div class="div3">div3</div>
<div class="div4">div4 - Using clear moves div4 down below the floated div3. The value "left" clears
elements floated to the left. You can also clear "right" and "both".</div>
</body>
</html>
Box_height_27.html
<!- -
The height property sets the height of an element.
Note: The height property does not include padding, borders, or margins; it sets the height of the area
inside the padding, border, and margin of the element!
Syntax:
height:auto|length;
-->
<!DOCTYPE html>
<html>
<head>
<style>
.div1 {
float: left;
width: 100px;
height: 50px;
margin: 10px;
border: 3px solid #73AD21;
}
.div2 {
border: 1px solid red;
}
.div3 {
float: left;
width: 100px;
height: 50px;
margin: 10px;
border: 3px solid #73AD21;
}
.div4 {
border: 1px solid red;
clear: left;
}
</style>
</head>
<body>
<h2>Without clear</h2>
<div class="div1">div1</div>
<div class="div2">div2 - Notice that the div2 element is after div1, in the HTML code. However, since
div1 is floated to the left, this happens: the text in div2 is floated around div1, and div2 surrounds the
whole thing.</div>
<h2>Using clear</h2>
<div class="div3">div3</div>
<div class="div4">div4 - Using clear moves div4 down below the floated div3. The value "left" clears
elements floated to the left. You can also clear "right" and "both".</div>
</body>
</html>
Box_left_28.html
<!- -
Set the left edge of the absolute positioned <div> element 80px to the right of the left edge of its
nearest positioned ancestor:
Syntax:
left:auto|length;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div.relative {
position: relative;
width: 400px;
height: 200px;
border: 3px solid #8AC007;
}
div.absolute {
position: absolute;
left: 80px;
width: 200px;
height: 120px;
border: 3px solid #8AC007;
}
</style>
</head>
<body>
</body>
</html>
Box_margin_29.html
<!- -
The CSS margin properties are used to generate space around elements.
The margin properties set the size of the white space outside the border.
With CSS, you have full control over the margins. There are CSS properties for setting the margin for
each side of an element (top, right, bottom, and left).
Syntax:
margin: top right bottom left;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 1px solid black;
margin: 100px 150px 100px 80px;
# margin-top: 100px;
# margin-bottom: 100px;
# margin-right: 150px;
# margin-left: 80px;
background-color: lightblue;
}
</style>
</head>
<body>
<div>This div element has a top margin of 100px, a right margin of 150px, a bottom margin of 100px,
and a left margin of 80px.</div>
</body>
</html>
Box_max_height_30.html
<!- -
The max-height property is used to set the maximum height of an element.
This prevents the value of the height property from becoming larger than max-height.
Note: The value of the max-height property overrides height.
Syntax:
max-height:none|length;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
max-height: 50px;
background-color: yellow;
overflow: auto;
}
</style>
</head>
<body>
<p>The maximum height of this paragraph is set to 50px. The maximum height of this paragraph is set to
50px. The maximum height of this paragraph is set to 50px. The maximum height of this paragraph is set
to 50px. The maximum height of this paragraph is set to 50px. The maximum height of this paragraph is
set to 50px. The maximum height of this paragraph is set to 50px. The maximum height of this
paragraph is set to 50px. The maximum height of this paragraph is set to 50px. The maximum height of
this paragraph is set to 50px.</p>
</body>
</html>
Box_max_width_31.html
<!- -
The max-width property is used to set the maximum width of an element.
This prevents the value of the width property from becoming larger than max-width.
</body>
</html>
Box_min_height_32.html
<!- -
The min-height property is used to set the minimum height of an element.
This prevents the value of the height property from becoming smaller than min-height.
Note: The value of the min-height property overrides both max-height and height.
Syntax:
min-height: length;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
min-height: 100px;
background-color: yellow;
}
</style>
</head>
<body>
</body>
</html>
Box_min_width_33.html
<!- -
The min-width property is used to set the minimum width of an element.
This prevents the value of the width property from becoming smaller than min-width.
Note: The value of the min-width property overrides both max-width and width.
Syntax:
bottom:auto|length;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
min-width: 150px;
background-color: yellow;
}
</style>
</head>
<body>
</body>
</html>
Box_overflow_34.html
<!- -
The overflow property specifies what happens if content overflows an element's box.
This property specifies whether to clip content or to add scrollbars when an element's content is too big
to fit in a specified area.
Note: The overflow property only works for block elements with a specified height.
Syntax:
overflow: visible|hidden|scroll|auto|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div.scroll {
background-color: #00FFFF;
width: 100px;
height: 100px;
overflow: scroll;
}
div.hidden {
background-color: #00FF00;
width: 100px;
height: 100px;
overflow: hidden;
}
</style>
</head>
<body>
<p>The overflow property specifies what to do if the content of an element exceeds the size of the
element's box.</p>
<p>overflow:scroll</p>
<div class="scroll">You can use the overflow property when you want to have better control of the
layout. The default value is visible.</div>
<p>overflow:hidden</p>
<div class="hidden">You can use the overflow property when you want to have better control of the
layout. The default value is visible.</div>
</body>
</html>
Box_padding_35.html
<!- -
The CSS padding properties are used to generate space around content.
The padding clears an area around the content (inside the border) of an element.
With CSS, you have full control over the padding. There are CSS properties for setting the padding for
each side of an element (top, right, bottom, and left).
Syntax:
padding:top right bottom left;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 1px solid black;
background-color: lightblue;
padding-top: 50px;
padding-right: 30px;
padding-bottom: 50px;
padding-left: 80px;
# padding:50px 30px 50px 80px;
}
</style>
</head>
<body>
<div>This div element has a top padding of 50px, a right padding of 30px, a bottom padding of 50px, and
a left padding of 80px.</div>
</body>
</html>
Box_position_36.html
<!- -
The position property specifies the type of positioning method used for an element (static, relative,
absolute or fixed).
Syntax:
position: static|absolute|fixed|relative|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
h2 {
position: absolute;
left: 100px;
top: 150px;
}
</style>
</head>
<body>
<p>With absolute positioning, an element can be placed anywhere on a page. The heading below is
placed 100px from the left of the page and 150px from the top of the page.</p>
</body>
</html>
Box_visibility_37.html
<!- -
Hiding an element can be done by setting the display property to none. The element will be hidden, and
the page will be displayed as if the element is not there:
visibility:hidden; also hides an element.
However, the element will still take up the same space as before. The element will be hidden, but still
affect the layout:
Syntax:
visibility:hidden;
-->
<!DOCTYPE html>
<html>
<head>
<style>
h1.hidden {
visibility: hidden;
# display: none;
}
</style>
</head>
<body>
</body>
</html>
Box_zindex_38.html
<!- -
The z-index property specifies the stack order of an element.
An element with greater stack order is always in front of an element with a lower stack order.
Note: z-index only works on positioned elements (position:absolute, position:relative, or position:fixed).
Syntax:
z-index: auto|number|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
img {
position: absolute;
left: 0px;
top: 0px;
z-index: -1;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<img src="w3css.gif" width="100" height="140">
<p>Because the image has a z-index of -1, it will be placed behind the text.</p>
</body>
</html>
Text Properties: 17
hanging-punctuation, hyphens, letter-spacing, line-break, line-height, overflow-wrap, tab-size, text-align,
text-align-last, text-combine-upright, text-indent, text-justify, text-transform, white-space, word-break,
word-spacing, word-wrap
Text_hanging_punctuation_39.html
<!- -
The hanging-punctuation property specifies whether a punctuation mark may be placed outside the line
box at the start or at the end of a full line of text.
Syntax:
hanging-punctuation: none|first|last|allow-end|force-end|initial|inherit;
-->
<html>
<head>
<style>
p{
# hanging-punctuation: allow-end;
hanging-punctuation: first;
padding 10px;
}
</style>
</head>
<body>
<p>Hai</p>
<P>
Somethingsomething something nothing. Nothingnothing nothing something.
</P>
</body>
</html>
Text_hyphens_40.html
<!- -
Hyphenation allows the controlled splitting of words onto 2 lines to improve the layout of text when
wrapping lines, typically splitting words at syllabic or morphemic boundaries and visually indicating the
split (usually by inserting a hyphen). In some cases, hyphenation may also alter the spelling of a word.
-->
Text_letter-spacing_41.html
<!- -
The letter-spacing property increases or decreases the space between characters in a text.
Syntax:
Letter-spacing: normal|length|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
letter-spacing: 2px;
}
h2 {
letter-spacing: -3px;
}
</style>
</head>
<body>
</body>
</html>
Text_line_break_42.html
<!- -
The line-break CSS property is used to specify how (or if) to break lines when working with punctuation
and symbols.
/* Keyword values */
line-break: auto;
line-break: loose;
line-break: normal;
line-break: strict;
/* Global values */
line-break: inherit;
line-break: initial;
line-break: unset;
-->
Text_line_hieight_43.html
<!- -
The line-height property specifies the line height.
Syntax:
line-height: normal|number|length|initial|inherit;
-->
<style>
div {
line-height:normal;
# line-height:1;
# line-height:2;
# line-height:3;
# line-height:4;
# line-height:1px;
# line-height:2px;
# line-height:10px;
# line-height:25px;
# line-height:50%;
# line-height:100%;
# line-height:150%;
# line-height:initial;
}
</style>
<div>
This example demonstrates different line-heights. You can change the lineheight by clicking on one of
the line-height properties on the left. This text is where you will see the result of the selected line-height
property.
</div>
Text_overflow_wrap_44.html
<!- -
The overflow-wrap property in CSS allows you to specify that the browser can break a line of text inside
the targeted element onto multiple lines in an otherwise unbreakable place. This helps to avoid an
unusually long string of text causing layout problems due to overflow.
• normal: the default. The browser will break lines according to normal line breaking rules. Words
or unbroken strings will not break, even if they overflow the container.
• break-word: words or strings of characters that are too large to fit inside their container will
break in an arbitrary place to force a line break. A hyphen character will not be inserted, even if
the hyphensproperty is used.
• inherit: the targeted element must inherit the value of theoverflow-wrap property defined on its
immediate parent.
Syntax:
overflow-wrap:normal|break-word|inherit;
-->
<head>
<script>
document.querySelector('button').addEventListener('click', function () {
document.querySelector('p').classList.toggle('ow');
}, false);
</script>
<style>
body {
padding: 20px;
font-size: 20px;
}
h2 {
text-align: center;
margin-bottom: 14px;
}
p {
margin: 0 auto;
max-width: 300px;
border: solid 2px #ccc;
padding: 12px;
}
button {
display: block;
margin: 20px auto;
}
.ow {
overflow-wrap: break-word;
word-wrap: break-word;
hyphens: auto;
}
</style>
</head>
<body>
<h2>overflow-wrap/word-wrap demo</h2>
<p>This is the first time I've seen the
word Pneumonoultramicroscopicsilicovolcanoconiosis. It's a long one.</p>
<button>Toggle Overflow Wrap</button>
</body>
Text_tab_size_45.html
<!- -
The tab-size property specifies the length of the space used for the tab character.
In HTML, the tab character is usually displayed as a single space-character, except for some elements,
like <textarea> and <pre>, and the result of the tab-size property will only be visible for these elements.
Syntax:
tab-size: number|length|initial|inherit;;
-->
<!DOCTYPE html>
<html>
<head>
<style>
#t1 {
-moz-tab-size: 4; /* Code for Firefox */
-o-tab-size: 4; /* Code for Opera 10.6-12.1 */
tab-size: 4;
}
#t2 {
-moz-tab-size: 16; /* Code for Firefox */
-o-tab-size: 16; /* Code for Opera 10.6-12.1 */
tab-size: 16;
}
</style>
</head>
<body>
<pre id="t1">
I use tab-size 4
</pre>
<pre id="t2">
I use tab-size 16
</pre>
<p><b>Note:</b> The tab-size property is currently supported in Chrome, Safari 6.1+ and Opera
15+.</p>
</body>
</html>
Text_align_46.html
<!- -
The text-align property specifies the horizontal alignment of text in an element.
Syntax:
text-align: left|right|center|justify|initial|inherit;-->
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
text-align: center;
}
h2 {
text-align: left;
}
h3 {
text-align: right;
}
</style>
</head>
<body>
</body>
</html>
Text_align_last_47.html
<!- -
The text-align-last property specifies how to align the last line of a text.
Note: The text-align-last property will only work for elements with the text-align property set to
"justify".
Syntax:
text-align-last: auto|left|right|center|justify|start|end|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
text-align: justify;
-moz-text-align-last: right; /* Code for Firefox */
text-align-last: right;
}
</style>
</head>
<body>
<div>
You can use the text-align-last property to align the last line of a text, if the text has the text-align
property set to justify. This text is where you will see the result of the text-align-last property. You can
use the text-align-last property to align the last line of a text, if the text has the text-align property set to
justify. This text is where you will see the result of the text-align-last property.
</div>
</body>
</html>
Text_combine_upright_48.html
<!- -
The text-combine-upright CSS property specifies the combination of multiple characters into the
space of a single character. If the combined text is wider than 1em, the user agent must fit the
contents within 1em. The resulting composition is treated as a single upright glyph for layout and
decoration. This property only has an effect in vertical writing modes.
This is used to produce an effect that is known as tate-chū-yoko ( 縦中横
) in Japanese, or
as 直書橫向 in Chinese.
Syntax:
Text-combine-upright:none|all|digits|digits 4|inherit|initial;
-->
<body>
<p lang="ja" class="exampleText"> 平成20年4月16日に</p>
</body>
<head>
<style>
.exampleText {
writing-mode: vertical-lr;
text-combine-upright: digits 2;
font: 36px serif;
}
</style>
</head>
Text_indent_49.html
<!- -
The text-indent property specifies the indentation of the first line in a text-block.
Note: Negative values are allowed. The first line will be indented to the left if the value is negative.
Syntax:
text-indent: length|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
text-indent: 50px;
}
</style>
</head>
<body>
<p>In my younger and more vulnerable years my father gave me some advice that I've been turning
over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that
all the people in this world haven't had the advantages that you've had.'</p>
</body>
</html>
Text_justify_50.html
<!- -
The text-justify property specifies the justification method to use when text-align is set to "justify".
This property specifies how justified text should be aligned and spaced.
Syntax:
text-justify: auto|inter-word|inter-ideograph|inter-
cluster|distribute|kashida|trim|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
text-align: justify;
text-justify: inter-word;
}
</style>
</head>
<body>
<div>In my younger and more vulnerable years my father gave me some advice that I've been turning
over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that
all the people in this world haven't had the advantages that you've had.'</div>
<p><b>Tip:</b> Resize the browser window to see how the value "justify" works.</p>
</body>
</html>
Text_transform_51.html
<!- -
The text-transform property controls the capitalization of text.
Syntax:
text-transform: none|capitalize|uppercase|lowercase|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p.uppercase {
text-transform: uppercase;
}
p.lowercase {
text-transform: lowercase;
}
p.capitalize {
text-transform: capitalize;
}
</style>
</head>
<body>
</body>
</html>
Text_white_space _52.html
<!- -
The white-space property specifies how white-space inside an element is handled.
Syntax:
white-space: normal|nowrap|pre|pre-line|pre-wrap|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
white-space: nowrap;
}
</style>
</head>
<body>
<p>
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
</p>
</body>
</html>
Text_word_break _53.html
<!- -
The word-break property specifies line breaking rules for non-CJK scripts.
Tip: CJK scripts are Chinese, Japanese and Korean ("CJK") scripts.
Syntax:
word-break: normal|break-all|keep-all|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p.test1 {
width: 140px;
border: 1px solid #000000;
word-break: keep-all;
}
p.test2 {
width: 140px;
border: 1px solid #000000;
word-break: break-all;
}
</style>
</head>
<body>
<p class="test2">This paragraph contains some text. The lines will break at any character.</p>
<p><b>Note:</b> The word-break property is not supported in Opera 12 and earlier versions.</p>
</body>
</html>
Text_word_spacing _54.html
<!- -
The word-spacing property increases or decreases the white space between words.
Note: Negative values are allowed.
Syntax:
word-spacing: normal|length|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
word-spacing: 30px;
}
</style>
</head>
<body>
<p>
This is some text. This is some text.
</p>
</body>
</html>
Text_word_wrap _55.html
<!- -
The word-wrap property allows long words to be able to be broken and wrap onto the next line.
Syntax:
word-wrap: normal|break-word|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p.test {
width: 11em;
border: 1px solid #000000;
word-wrap: break-word;
}
</style>
</head>
<body>
</body>
</html>
}
h3 {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
</body>
</html>
Text_decoration_color_57.html
<!- -
The text-decoration-color property specifies the color of the text-decoration (underlines, overlines,
linethroughs).
Note: The text-decoration-color property will only have an effect on elements with a visible text-
decoration.
Syntax:
text-decoration-color: color|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
text-decoration: underline;
-moz-text-decoration-color: red; /* Code for Firefox */
text-decoration-color: red;
}
</style>
</head>
<body>
</body>
</html>
Text_decoration_line_58.html
<!- -
The text-decoration-line property specifies what type of line, if any, the decoration will have.
Note: You can also set the text-decoration-line using the text-decoration property, which is a short-hand
property for the text-decoration-line, text-decoration-style, and the text-decoration-color properties.
Note: You can also combine more than one value, like underline and overline to display lines both under
and over the text.
Syntax:
text-decoration-line: none|underline|overline|line-through|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
-moz-text-decoration-line: overline; /* Code for Firefox */
text-decoration-line: overline;
}
</style>
</head>
<body>
</body>
</html>
Text_decoration_style_59.html
<!- -
The numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -moz- specify the first version that worked with a prefix.
Syntax:
text-decoration-style: solid|double|dotted|dashed|wavy|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
p{
text-decoration: underline;
text-decoration-style: wavy;
}
</style>
</head>
<body>
<p>The paragraphs in this example should be displayed with a wavy line under the text.</p>
</body>
</html>
Text_shadow_60.html
<!- -
The text-shadow property adds shadow to text.
This property accepts a comma-separated list of shadows to be applied to the text.
Syntax:
text-shadow: h-shadow v-shadow blur-radius color|none|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
text-shadow: 2px 2px #FF0000;
}
</style>
</head>
<body>
<h1>Text-shadow effect</h1>
<p><b>Note:</b> Internet Explorer 9 and earlier do not support the text-shadow property.</p>
</body>
</html>
Text_underline_position_61.html
<!- -
The CSS text-underline-position property specifies the position of the underline which is set using
the text-decoration propertyunderline value.
Syntax:
text-underline-position: auto;
text-underline-position: under;
text-underline-position: left;
text-underline-position: right;
text-underline-position: under left;
text-underline-position: right under;
/* Global values */
text-underline-position: inherit;
text-underline-position: initial;
text-underline-position: unset;
-->
Font Properties: 20
@font-face, @font-feature-values, font, font-family, font-feature-settings, font-kerning, font-language-
override, font-size, font-size-adjust, font-stretch, font-style, font-synthesis, font-variant, font-variant-
alternates, font-variant-caps, font-variant-east-asian, font-variant-ligatures, font-variant-numeric, font-
variant-position, font-weight
Font_Face_62.html
<!- -
With the @font-face rule, web designers do no longer have to use one of the "web-safe" fonts.
In the new @font-face rule you must first define a name for the font (e.g. myFirstFont), and
then point to the font file.
Tip: Use lowercase letters for the font URL. Uppercase letters can give unexpected results in IE!
To use the font for an HTML element, refer to the name of the font (myFirstFont) through the
font-family property:
Syntax:
@font-face {
font-properties
}
font-family:name src:url font-strech: normal|condensed|ultra-condensed|extra-
condensed|semi-condensed|expanded|semi-expanded|extra-expanded|ultra-
condensed font-style:normal|italic|oblique font-weight:normal|bold|100|200
-->
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div {
font-family: myFirstFont;
}
</style>
</head>
<body>
<div>With CSS3, websites can finally use fonts other than the pre selected "web-safe" fonts.</div>
<p><b>Note:</b> Internet Explorer 8 and earlier, do not support the @font-face rule with the WOFF
format (only support for EOT format).</p>
</body>
</html>
Font_Family_63.html
<!- -
The CSS font properties define the font family, boldness, size, and the style of a text.
CSS Font Families
In CSS, there are two types of font family names:
• generic family - a group of font families with a similar look (like "Serif" or "Monospace")
• font family - a specific font family (like "Times New Roman" or "Arial")
Serif Times New Roman Serif fonts have small lines at the ends on
Georgia some characters
-->
<!DOCTYPE html>
<html>
<head>
<style>
p.serif {
font-family: "Times New Roman", Times, serif;
}
p.sansserif {
font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>
<h1>CSS font-family</h1>
<p class="serif">This is a paragraph, shown in the Times New Roman font.</p>
<p class="sansserif">This is a paragraph, shown in the Arial font.</p>
</body>
</html>
Font_Style_64.html
<!- -
The font-style property is mostly used to specify italic text.
This property has three values:
• normal - The text is shown normally
• italic - The text is shown in italics
• oblique - The text is "leaning" (oblique is very similar to italic, but less supported)
-->
<!DOCTYPE html>
<html>
<head>
<style>
p.normal {
font-style: normal;
}
p.italic {
font-style: italic;
}
p.oblique {
font-style: oblique;
}
</style>
</head>
<body>
</body>
</html>
Font_Size_px_65.html
<!- -
The font-size property sets the size of the text.
Being able to manage the text size is important in web design. However, you should not use font size
adjustments to make paragraphs look like headings, or headings look like paragraphs.
Always use the proper HTML tags, like <h1> - <h6> for headings and <p> for paragraphs.
The font-size value can be an absolute, or relative size.
Absolute size:
• Sets the text to a specified size
• Does not allow a user to change the text size in all browsers (bad for accessibility reasons)
• Absolute size is useful when the physical size of the output is known
Relative size:
• Sets the size relative to surrounding elements
• Allows a user to change the text size in browsers
Note: If you do not specify a font size, the default size for normal text, like paragraphs, is 16px
(16px=1em).
-->
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
font-size: 40px;
}
h2 {
font-size: 30px;
}
p{
font-size: 14px;
}
</style>
</head>
<body>
</body>
</html>
Font_Size_em_66.html
<!- -
To allow users to resize the text (in the browser menu), many developers use em instead of pixels.
The em size unit is recommended by the W3C.
1em is equal to the current font size. The default text size in browsers is 16px. So, the default size of
1em is 16px.
The size can be calculated from pixels to em using this formula: pixels/16=em
-->
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
font-size: 2.5em; /* 40px/16=2.5em */
}
h2 {
font-size: 1.875em; /* 30px/16=1.875em */
}
p{
font-size: 0.875em; /* 14px/16=0.875em */
}
</style>
</head>
<body>
</body>
</html>
Font_Weight_67.html
<!- -
The font-weight property specifies the weight of a font:
-->
<!DOCTYPE html>
<html>
<head>
<style>
p.normal {
font-weight: normal;
}
p.light {
font-weight: lighter;
}
p.thick {
font-weight: bold;
}
p.thicker {
font-weight: 900;
}
</style>
</head>
<body>
</body>
</html>
Font_Variant_68.html
<!- -
The font-variant property specifies whether or not a text should be displayed in a small-caps font.
In a small-caps font, all lowercase letters are converted to uppercase letters. However, the converted
uppercase letters appears in a smaller font size than the original uppercase letters in the text.
-->
<!DOCTYPE html>
<html>
<head>
<style>
p.normal {
font-variant: normal;
}
p.small {
font-variant: small-caps;
}
</style>
</head>
<body>
</body>
</html>
Writing_Mode_direction_69.html
<!- -
Set the text direction to "right-to-left":
Syntax:
direction: ltr|rtl|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div.ex1 {
direction: rtl;
}
</style>
</head>
<body>
</body>
</html>
Table Properties: 5
border-collapse, border-spacing, caption-side, empty-cells, table-layout
Table_border_collapse_70.html
<!- -
The border-collapse property sets whether the table borders are collapsed into a single border or
detached as in standard HTML.
Syntax:
border-collapse: separate|collapse|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: collapse;
}
table, td, th {
border: 1px solid black;
}
</style>
</head>
<body>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
</tr>
</table>
<p><b>Note:</b> If a !DOCTYPE is not specified, the border-collapse property can produce unexpected
results
in IE8 and earlier versions.</p>
</body>
</html>
Table_border_spacing_71.html
<!- -
The border-spacing property sets the distance between the borders of adjacent cells (only for the
"separated borders" model).
Syntax:
border-spacing: length|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
table.ex1 {
border-collapse: separate;
border-spacing: 10px;
}
table.ex2 {
border-collapse: separate;
border-spacing: 10px 50px;
}
</style>
</head>
<body>
<td>Cleveland</td>
<td>Brown</td>
</tr>
<tr>
<td>Glenn</td>
<td>Quagmire</td>
</tr>
</table>
</body>
</html>
Table_caption_side_72.html
<!- -
The caption-side property specifies the placement of a table caption.
Syntax:
caption-side: top|bottom|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
caption {
caption-side: bottom;
}
</style>
</head>
<body>
<table border="1">
<caption>Table 1.1 Customers</caption>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Berglunds snabbköp</td>
<td>Christina Berglund</td>
<td>Sweden</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
<tr>
<td>Ernst Handel</td>
<td>Roland Mendel</td>
<td>Austria</td>
</tr>
<tr>
<td>Island Trading</td>
<td>Helen Bennett</td>
<td>UK</td>
</tr>
<tr>
<td>Magazzini Alimentari Riuniti</td>
<td>Giovanni Rovelli</td>
<td>Italy</td>
</tr>
<tr>
<td>North/South</td>
<td>Simon Crowther</td>
<td>UK</td>
</tr>
</table>
</body>
</html>
Table_empty_cells_73.html
<!- -
The empty-cells property sets whether or not to display borders and background on empty cells in a
table (only for the "separated borders" model).
Syntax:
empty-cells: show|hide|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: separate;
empty-cells: hide;
}
</style>
</head>
<body>
<table border="1">
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td></td>
</tr>
</table>
</body>
</html>
Table_Layout_74.html
<!- -
The table-layout property sets the table layout algorithm to be used for a table.
Syntax:
table-layout: auto|fixed|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
table {
border-collapse: separate;
width: 100%;
border: 1px solid black;
}
td {
border: 1px solid black;
}
table.ex1 {
table-layout: auto;
}
table.ex2 {
table-layout: fixed;
}
</style>
</head>
<body>
<p>table-layout: auto:</p>
<table class="ex1">
<tr>
<td width="5%">1000000000000000000000000000</td>
<td width="95%">10000000</td>
</tr>
</table>
<p>table-layout: fixed:</p>
<table class="ex2">
<tr>
<td width="5%">1000000000000000000000000000</td>
<td width="95%">10000000</td>
</tr>
</table>
</body>
</html>
h1 {
counter-reset: subsection;
h1:before {
counter-increment: section;
content: "Section " counter(section) ". ";
}
h2:before {
counter-increment: subsection;
content: counter(section) "." counter(subsection) " ";
}
</style>
</head>
<body>
<h1>HTML tutorials</h1>
<h2>HTML Tutorial</h2>
<h2>XHTML Tutorial</h2>
<h2>CSS Tutorial</h2>
<h1>Scripting tutorials</h1>
<h2>JavaScript</h2>
<h2>VBScript</h2>
<h1>XML tutorials</h1>
<h2>XML</h2>
<h2>XSL</h2>
</body>
</html>
List_Counter_reset_76.html
<!- -
The counter-reset property creates or resets one or more counters.
The counter-reset property is usually used together with the counter-increment property and the
content property.
Syntax:
counter-reset: none|name number|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
body {
counter-reset: section;
}
h1 {
counter-reset: subsection;
}
h1:before {
counter-increment: section;
content: "Section " counter(section) ". ";
}
h2:before {
counter-increment: subsection;
content: counter(section) "." counter(subsection) " ";
}
</style>
</head>
<body>
<h1>HTML tutorials</h1>
<h2>HTML Tutorial</h2>
<h2>XHTML Tutorial</h2>
<h2>CSS Tutorial</h2>
<h1>Scripting tutorials</h1>
<h2>JavaScript</h2>
<h2>VBScript</h2>
<h1>XML tutorials</h1>
<h2>XML</h2>
<h2>XSL</h2>
</body>
</html>
List_Style_77.html
<!- -
The list-style shorthand property sets all the list properties in one declaration.
The properties that can be set, are (in order): list-style-type, list-style-position, list-style-image.
If one of the values above are missing, e.g. "list-style:circle inside;", the default value for the missing
property will be inserted, if any.
Syntax:
list-style: list-style-type list-style-position list-style-
image|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style: square inside url("sqpurple.gif");
}
</style>
</head>
<body>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>
</body>
</html>
List_Style_Colors_78.html
<!- -
We can also style lists with colors, to make them look a little more interesting.
Anything added to the <ol> or <ul> tag, affects the entire list, while properties added to the <li> tag will
affect the individual list items:
-->
<!DOCTYPE html>
<html>
<head>
<style>
ol {
background: #ff9999;
padding: 20px;
}
ul {
background: #3399ff;
padding: 20px;
}
ol li {
background: #ffe5e5;
padding: 5px;
margin-left: 35px;
}
ul li {
background: #cce5ff;
margin: 5px;
}
</style>
</head>
<body>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ol>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ul>
</body>
</html>
Animation Properties: 10
@keyframes, animation, animation-delay, animation-direction, animation-duration, animation-fill-
mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function
Keyframes_79.html
<!- -
The @keyframes rule specifies the animation code.
The animation is created by gradually changing from one set of CSS styles to another.
During the animation, you can change the set of CSS styles many times.
Specify when the style change will happen in percent, or with the keywords "from" and "to", which is
the same as 0% and 100%. 0% is the beginning of the animation, 100% is when the animation is
complete.
Tip: For best browser support, you should always define both the 0% and the 100% selectors.
Note: Use the animation properties to control the appearance of the animation, and also to bind the
animation to selectors.
Syntax:
@keyframes animationname {keyframes-selector {css-styles;}}
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
position :relative;
-webkit-animation: mymove 5s infinite; /* Safari 4.0 - 8.0 */
animation: mymove 5s infinite;
}
/* Standard syntax */
@keyframes mymove {
0% {top: 0px;}
25% {top: 200px;}
75% {top: 50px}
100% {top: 100px;}
}
</style>
</head>
<body>
<p><strong>Note:</strong> The @keyframes rule is not supported in Internet Explorer 9 and earlier
versions.</p>
<div></div>
</body>
</html>
Animation_80.html
<!- -
CSS3 animations allows animation of most HTML elements without using JavaScript or Flash!
/* Standard syntax */
@keyframes example {
from {background-color: red;}
to {background-color: yellow;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
</body>
</html>
Animation_81.html
<!- -
The following example will change both the background-color and the position of the <div> element
when the animation is 25% complete, 50% complete, and again when the animation is 100% complete:
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
-webkit-animation-name: example; /* Safari 4.0 - 8.0 */
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
animation-name: example;
animation-duration: 4s;
}
/* Standard syntax */
@keyframes example {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
</body>
</html>
Animation_Delay_82.html
<!- -
The animation-delay property specifies a delay for the start of an animation.
The following example has a 2 seconds delay before starting the animation:
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
-webkit-animation-name: example; /* Safari 4.0 - 8.0 */
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
-webkit-animation-delay: 2s; /* Safari 4.0 - 8.0 */
animation-name: example;
animation-duration: 4s;
animation-delay: 2s;
}
/* Standard syntax */
@keyframes example {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
</body>
</html>
Animation_Iteration_Count_83.html
<!- -
The animation-iteration-count property specifies the number of times an animation should run.
The following example will run the animation 3 times before it stops:
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
-webkit-animation-name: example; /* Safari 4.0 - 8.0 */
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
-webkit-animation-iteration-count: 3; /* Safari 4.0 - 8.0 */
animation-name: example;
animation-duration: 4s;
# animation-iteration-count: 3;
# animation-iteration-count: infinite;
}
/* Standard syntax */
@keyframes example {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
</body>
</html>
Animation_Reverse_Direction_84.html
<!- -
The animation-direction property is used to let an animation run in reverse direction or alternate cycles.
The following example will run the animation in reverse direction:
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
-webkit-animation-name: example; /* Safari 4.0 - 8.0 */
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
-webkit-animation-iteration-count: 3; /* Safari 4.0 - 8.0 */
-webkit-animation-direction: reverse; /* Safari 4.0 - 8.0 */
animation-name: example;
animation-duration: 4s;
animation-iteration-count: 3;
animation-direction: reverse;
# animation-direction: alternate;
}
/* Standard syntax */
@keyframes example {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
</body>
</html>
Animation_Speed_Curve_85.html
<!- -
The animation-timing-function property specifies the speed curve of the animation.
The animation-timing-function property can have the following values:
• ease - specifies an animation with a slow start, then fast, then end slowly (this is default)
• 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
• cubic-bezier(n,n,n,n) - lets you define your own values in a cubic-bezier function
The following example shows the some of the different speed curves that can be used:
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 50px;
background-color: red;
font-weight: bold;
position: relative;
-webkit-animation: mymove 5s infinite; /* Safari 4.0 - 8.0 */
animation: mymove 5s infinite;
}
/* Standard syntax */
#div1 {animation-timing-function: linear;}
#div2 {animation-timing-function: ease;}
#div3 {animation-timing-function: ease-in;}
#div4 {animation-timing-function: ease-out;}
#div5 {animation-timing-function: ease-in-out;}
/* Standard syntax */
@keyframes mymove {
from {left: 0px;}
to {left: 300px;}
}
</style>
</head>
<body>
<div id="div1">linear</div>
<div id="div2">ease</div>
<div id="div3">ease-in</div>
<div id="div4">ease-out</div>
<div id="div5">ease-in-out</div>
</body>
</html>
Animation_Shorthand_86.html
<!- -
The same animation effect as above can be achieved by using the shorthand animation property:
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
position: relative;
-webkit-animation: myfirst 5s linear 2s infinite alternate; /* Safari 4.0 - 8.0 */
animation: myfirst 5s linear 2s infinite alternate;
}
/* Standard syntax */
@keyframes myfirst {
0% {background-color:red; left:0px; top:0px;}
25% {background-color:yellow; left:200px; top:0px;}
50% {background-color:blue; left:200px; top:200px;}
75% {background-color:green; left:0px; top:200px;}
100% {background-color:red; left:0px; top:0px;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
</body>
</html>
Transform Properties: 6
backface-visibility, perspective, perspective-origin, transform, transform-origin, transform-style
Backface_visibility_87.html
<!- -
The backface-visibility property defines whether or not an element should be visible when not facing the
screen.
This property is useful when an element is rotated, and you do not want to see its backside.
Syntax:
backface-visibility: visible|hidden|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
position: relative;
height: 60px;
width: 60px;
background-color: red;
-webkit-transform: rotateY(180deg); /* Chrome, Safari, Opera */
transform: rotateY(180deg);
}
#div1 {
-webkit-backface-visibility: hidden; /* Chrome, Safari, Opera */
backface-visibility: hidden;
}
#div2 {
-webkit-backface-visibility: visible; /* Chrome, Safari, Opera */
backface-visibility: visible;
}
</style>
</head>
<body>
<p>This example shows two div elements, rotated 180 degrees, facing away from the user.</p>
<p>The first div element has the backface-visibility property set to "hidden", and should therefore be
invisible.</p>
</body>
</html>
Perspective_88.html
<!- -
The perspective property defines how many pixels a 3D element is placed from the view. This property
allows you to change the perspective on how 3D elements are viewed.
When defining the perspective property for an element, it is the CHILD elements that get the
perspective view, NOT the element itself.
Note: The perspective property only affects 3D transformed elements!
Syntax:
perspective: length|none;
-->
<!DOCTYPE html>
<html>
<head>
<style>
#div1 {
position: relative;
height: 150px;
width: 150px;
margin: 50px;
padding: 10px;
border: 1px solid black;
-webkit-perspective: 150px; /* Chrome, Safari, Opera */
perspective: 150px;
}
#div2 {
padding: 50px;
position: absolute;
border: 1px solid black;
background-color: red;
-webkit-transform: rotateX(45deg); /* Chrome, Safari, Opera */
transform: rotateX(45deg);
}
</style>
</head>
<body>
<p><strong>Note:</strong> The perspective property is not supported in IE9 and earlier versions.</p>
<div id="div1">
<div id="div2">HELLO</div>
</div>
</body>
</html>
Perspective_Origin_89.html
<!- -
The perspective-origin property defines where a 3D element is based in the x- and the y-axis. This
property allows you to change the bottom position of 3D elements.
When defining the perspective-origin property for an element, it is the CHILD elements that are
positioned, NOT the element itself.
Note: This property must be used together with the perspective property, and only affects 3D
transformed elements!
Syntax:
perspective-origin: x-axis y-axis|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
#div1 {
position: relative;
height: 150px;
width: 150px;
margin: 50px;
padding: 10px;
border: 1px solid black;
-webkit-perspective: 150px; /* Chrome, Safari, Opera */
-webkit-perspective-origin: 10% 10%; /* Chrome, Safari, Opera */
perspective: 150px;
perspective-origin: 10% 10%;
}
#div2 {
padding: 50px;
position: absolute;
border: 1px solid black;
background-color: red;
-webkit-transform: rotateX(45deg); /* Chrome, Safari, Opera */
transform: rotateX(45deg);
}
</style>
</head>
<body>
<div id="div1">
<div id="div2">HELLO</div>
</div>
</body>
</html>
Transform_Rotate_90.html
<!- -
The transform property applies a 2D or 3D transformation to an element. This property allows you to
rotate, scale, move, skew, etc., elements.
Syntax:
transform: none|transform-functions|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 200px;
height: 100px;
background-color: yellow;
/* Rotate div */
-ms-transform: rotate(7deg); /* IE 9 */
-webkit-transform: rotate(7deg); /* Chrome, Safari, Opera */
transform: rotate(20deg);
/* matrix div */
transform:matrix(0.866,0.5,-0.5,0.866,0,0);
/* translate div */
transform:translate(20px,10px);
/* scale div */
transform:scale(1.1,1.1);
# transform:scale(1.5,1.5);
# transform:scale(2,2);
/* scaleX div */
transform:scaleX(1.1);
/* scaleY div */
transform:scaleY(1.1);
/* rotate div */
transform:rotate(10deg);
/* rotateX div */
transform:rotateX(60deg);
/* rotateY div */
transform:rotateY(60deg);
/* rotateZ div */
transform:rotateZ(45deg);
/* skew div */
transform:skew(30deg,30deg);
}
</style>
</head>
<body>
<div>Hello</div>
<br>
<p><b>Note:</b> Internet Explorer 8 and earlier versions do not support the transform property.</p>
</body>
</html>
Transition Properties: 5
transition, transition-property, transition-duration, transition-timing-function, transition-delay
Transition_91.html
<!- -
The transition-property property specifies the name of the CSS property the transition effect is for (the
transition effect will start when the specified CSS property changes).
Tip: A transition effect could typically occur when a user hover over an element.
Note: Always specify the transition-duration property, otherwise the duration is 0, and the transition
will have no effect.
Syntax:
transition-property: none|all|property|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
-webkit-transition-property: width, height; /* Safari */
-webkit-transition-duration: 2s; /* Safari */
transition-property: width, height;
transition-duration: 2s;
}
div:hover {
width: 300px;
height: 300px;
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
<p>Hover over the div element above, to see the transition effect.</p>
</body>
</html>
Basic UI Properties: 16
box-sizing, content, cursor, ime-mode, nav-down, nav-index, nav-left, nav-right, nav-up, outline, outline-
color, outline-offset, outline-style, outline-width, resize, text-overflow
BoxSizing_92.html
<!- -
The box-sizing property is used to tell the browser what the sizing properties (width and height) should
include.
Should they include the border-box? Or just the content-box (which is the default value of the width and
height properties)?
Syntax:
box-sizing: content-box|border-box|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
.div1 {
width: 300px;
height: 100px;
.div2 {
width: 300px;
height: 100px;
padding: 50px;
border: 1px solid red;
box-sizing: border-box;
}
</style>
</head>
<body>
<h2>With box-sizing</h2>
<div class="div1">Both divs are the same size now!</div>
<br>
<div class="div2">Hooray!</div>
</body>
</html>
Content_93.html
<!- -
The content property is used with the :before and :after pseudo-elements, to insert generated content.
Syntax:
content: normal|none|counter|attr|string|open-quote|close-quote|no-open-
quote|no-close-quote|url|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
a:after {
content: " (" attr(href) ")";
}
</style>
</head>
<body>
</body>
</html>
Cursor_94.html
<!- -
The cursor property specifies the type of cursor to be displayed when pointing on an element.
Syntax:
cursor: alias|all-scroll|auto|cell|context-menu|col-
resize|copy|crosshair|default|e-resize|ew-resize|grab|grabbing|help|move|n-
resize|ne-resize|nesw-resize|ns-resize|nw-resize|nwse-resize|no-
drop|none|not-allowed|pointer|progress|row-resize|s-resize|se-resize|sw-
resize|text|URL|vertical-text|w-resize|wait|zoom-in|zoom-out|initial|inherit;
-->
<!DOCTYPE html>
<html>
<body>
<p>Mouse over the words to change the cursor.</p>
<span style="cursor:auto">auto</span><br>
<span style="cursor:crosshair">crosshair</span><br>
<span style="cursor:default">default</span><br>
<span style="cursor:e-resize">e-resize</span><br>
<span style="cursor:grab">grab</span><br>
<span style="cursor:help">help</span><br>
<span style="cursor:move">move</span><br>
<span style="cursor:n-resize">n-resize</span><br>
<span style="cursor:ne-resize">ne-resize</span><br>
<span style="cursor:nw-resize">nw-resize</span><br>
<span style="cursor:pointer">pointer</span><br>
<span style="cursor:progress">progress</span><br>
<span style="cursor:s-resize">s-resize</span><br>
<span style="cursor:se-resize">se-resize</span><br>
<span style="cursor:sw-resize">sw-resize</span><br>
<span style="cursor:text">text</span><br>
<span style="cursor:w-resize">w-resize</span><br>
<span style="cursor:wait">wait</span><br>
<span style="cursor:not-allowed">not-allowed</span><br>
<span style="cursor:no-drop">no-drop</span><br>
</body>
</html>
Outline_95.html
<!- -
The CSS outline properties specify the style, color, and width of an outline.
An outline is a line that is drawn around elements (outside the borders) to make the element "stand
out".
However, the outline property is different from the border property - The outline is NOT a part of an
element's dimensions; the element's total width and height is not affected by the width of the outline.
The outline-style property specifies the style of the outline.
</body>
</html>
Resize_96.html
<!- -
The resize property specifies whether or not an element is resizable by the user.
Note: The resize property applies to elements whose computed overflow value is something other than
"visible".
resize: none|both|horizontal|vertical|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 2px solid;
padding: 20px;
width: 300px;
resize: both;
overflow: auto;
}
</style>
</head>
<body>
<div>Let the user resize both the height and the width of this div element.</div>
</body>
</html>
Text_Overflow_97.html
<!- -
The text-overflow property specifies how overflowed content that is not displayed should be signaled to
the user.
text-overflow: clip|ellipsis|string|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
#div1 {
white-space: nowrap;
width: 12em;
overflow: hidden;
text-overflow: clip;
border: 1px solid #000000;
}
#div2 {
white-space: nowrap;
width: 12em;
overflow: hidden;
text-overflow: ellipsis;
border: 1px solid #000000;
}
</style>
</head>
<body>
<p>The following two divs contains a long text that will not fit in the box. As you can see, the text is
clipped.</p>
</body>
</html>
</style>
</head>
<body>
<div class="newspaper">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor
in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero
eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te
feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming
id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis
qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt
saepius.
</div>
</body>
</html>
Column_fill_99.html
<!- -
The column-fill property specifies how to fill columns, balanced or not.
column-fill: balance|auto|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper1 {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
-webkit-column-fill: auto; /* Chrome, Safari, Opera */
-moz-column-fill: auto; /* Firefox */
column-fill: auto;
}
.newspaper2 {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
-webkit-column-fill: balance; /* Chrome, Safari, Opera */
-moz-column-fill: balance; /* Firefox */
column-fill: balance;
}
</style>
</head>
<body>
<div class="newspaper1">
column-fill: auto: Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis
nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem
vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat
nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit
augue duis dolore te feugait nulla facilisi.
</div>
<br><br>
<div class="newspaper2">
column-fill: balance: Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis
nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem
vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat
nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit
augue duis dolore te feugait nulla facilisi.
</div>
</body>
</html>
Column_gap_100.html
<!- -
The column-gap property specifies the gap between the columns.
column-gap: length|normal|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
</html>
Column_rule_101.html
<!- -
The column-rule property is a shorthand property for setting all the column-rule-* properties.
The column-rule property sets the width, style, and color of the rule between columns.
column-rule: column-rule-width column-rule-style column-rule-
color|initial|inherit;
-->
<!DOCTYPE html>
<html>
<head>
<style>
.newspaper {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
-webkit-column-gap: 40px;
-webkit-column-rule-style: dotted;
/* Firefox */
-moz-column-count: 3;
-moz-column-gap: 40px;
-moz-column-rule-style: dotted;
column-count: 3;
column-gap: 40px;
column-rule-style: dotted;
}
</style>
</head>
<body>
</body>
</html>
Paged Media Properties: 4
Orphans, page-break-after, page-break-before, page-break-inside
Generated Content for Paged Media Properties: 2
marks, quotes
Filter Effects Properties: 1
filter
Filter_103.html
<!- -
The filter property defines visual effects (like blur and saturation) to an element (often <img>).
filter: none | blur() | brightness() | contrast() | drop-shadow() |
grayscale() | hue-rotate() | invert() | opacity() | saturate() |
sepia() | url();
-->
<!DOCTYPE html>
<html>
<head>
<style>
img {
-webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
filter: grayscale(100%);
}
</style>
</head>
<body>
<p><strong>Note:</strong> The filter property is not supported in Internet Explorer, Edge 12, or Safari
5.1 and earlier.</p>
</body>
</html>
Masking Properties: 2
mask, mask-type
Speech Properties: 14
Mark, mark-after, mark-before, Phonemes, rest, rest-after, rest-before, voice-balance, voice-duration,
voice-pitch, voice-pitch-range, voice-rate, voice-stress, voice-volume
Marquee Properties: 4
marquee-direction, marquee-play-count, marquee-speed, marquee-style