HTML

HyperText Markup Language

WEB API



  1. DOM
  2. Device APIs
  3. Communication APIs
  4. Data Management APIs
  5. Privileged APIs
  6. Certified APIs

DOCTYPE


 <!DOCTYPE HTML>

A SIMPLE EXAMPLE

 <!DOCTYPE html>
<html lang="en">
<head>
  <title>A tiny document</title>
</head>
<body>
  <h1>Main heading in my document</h1>
  <!-- Note that it is "h" + "1", not "h" + the letters "one" -->
  <p>Look Ma, I am coding <abbr title="Hyper Text Markup Language">HTML</abbr>.</p>
</body>
</html>


ATRRIBUTES

autocomplete, autofocus, checked, contenteditable, data-*, href, id, maxlength...



ELEMENTS

<a>, <abbr>, <acronym>, <address>, <applet>, <area>, <article>, <aside>
<audio>, <table>, <tbody>, <td>, <template>, <textarea>, <tfoot>, <th>, <thead>

HTML5




  • Semantics
  • Connectivity
  • Offline & Storage
  • Multimedia
  • Performance & Integration
  • Device Access
  • Styling



MDN for HTML

Mozilla Developer Network

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference






CSS
Cascading Style Sheets

CSS - Query Language



.a {
	font-size: 12px;
}
SELECT a FROM dom WHERE classname = 'a'

Properties


 :active
animation
animation-delay
animation-fill-mode
animation-iteration-count
animation-name
animation-play-state
animation-timing-function
attr()
autotop
touch-action
transform
transform-origin
height
width
transition-delay
transition-duration
transition-property
transition-timing-function

Box Model


Selectors

*


* {

margin: 0;

padding: 0;

}


#container * {

border: 1px solid black;

}




Selectors

x

x - tagname

x {

background-color: blue;

}



Selectors

#x

#container {

border: 1px solid black;

}



Selectors


.x

.error {

color: red;

}




Selectors



x y

Select all 'y' which are descendants of 'x'

li a {

text-decoration: none;

}


Selectors



a:visited a:link a:hover


":<param>" - pseudo class elements


a:visited {

color: red;

}


a:link {

color: purple;

}




Selectors



x + y

select first `y` adjacent to `x`


ul + p {

color: red;

}





Selectors


x > y

select all `y` which are direct children to `x`


div#container > ul {

border: 1px solid black;

}

<div id="container">

<ul>

<li> List Item

<ul>

<li> Child </li>

</ul>

</li>

<li> List Item </li>

<li> List Item </li>

<li> List Item </li>

</ul>

</div>



Selectors


x ~ y


select all `y` adjacent to `x`


ul ~ p {

color: red;

}





Selectors


x[attr]

attribute selector: select all x which have attribute `title`


a[title] {

  color: green;

}





Selectors


x[attr="z"]

attribute selector: select all x which have attribute `attr` whose value is equal = z


a[href="www.google.com"] {

  color: green;

}


// multiple attributes

a[href="www.google.com"][title="google"] {

color: green;

}



Selectors


a[href*="tuts"]

attribute selector: select all anchor tags which have attribute `href` whose value contains the word `tuts`


a[href*="tuts"] {

  color: green;

}



Selectors


a[href^="http"]

attribute selector: select all anchor tags which have attribute `href` whose value start with the word `http`


a[href^="http"] {

  color: green;

}






Selectors


a[href$=".jpg"]

attribute selector: select all anchor tags which have attribute `href` whose value end with the word `.jpg`


a[href$=".jpg"] {

  color: green;

}






Selectors


x:checked


Used of radio buttons and checkboxes.


input[type=radio]:checked {

  border: 1px solid black;

}





Selectors


x:after

A special pseudo class which can add content


.clearfix:after {

   content: "";

   display: block;

   clear: both;

   visibility: hidden;

   height: 0;

}


.clearfix {

  display: inline-block;

}



Selectors


x:before

A special pseudo class which can add content


.clearfix:before {

   content: "";

   display: block;

   clear: both;

   visibility: hidden;

   height: 0;

}


.clearfix {

  display: inline-block;

}



Selectors


x:nth-child(n)

1 based indexing


li:nth-child(3) {

  color: red;

}


li:nth-child(4n) {

  color: red;

}




Selectors


x:nth-last-child(n)

1 based indexing. begins at end of the collection


li:nth-last-child(3) {

  color: red;

}


li:nth-child(4n) {

  color: red;

}




Selectors


x:first-child

ul li:first-child {

  border-top: none;

}




Selectors


x:last-child

ul > li:last-child {

  border-top: none;

}













CSS3

Modules and Snapshots






MDN - CSS

Mozilla Developer Network
https://developer.mozilla.org/en-US/docs/Web/CSS





Questions?

Made with Slides.com