MAD 9013 - serdarulutas/MADD-Notes GitHub Wiki

WEEK 2


WEEK 1

STRUCTURE TAGS

body, nav, header, main, section, article, aside, footer

section tag would have a <h> tag and other content

LISTS

Covered ul, ol, and dl

<dl>
  <dt></dt> -> Dictionary Term
  <dd></dd> -> Dictionary Definition
</dl>

IMAGES

There are multiple choices

  1. img tag

<img src="url" alt="text">

  1. figure tag
<figure>
  <img src="url">
  <figcaption>text</figcaption>
</figure>
  1. picture tag is used for responsive design
<picture>
  <source srcset="url". media="min/max media setting" />
  <source srcset="url". media="min/max media setting" />
  <img src="url". alt="fallback">
</picture>

DATE-TIME

<time datetime="pattern">text</time>

Pattern can be as such:

  • yyyy-mm-dd
  • mm-dd : 12-23 represents December 23
  • yyyyW14 : 2022W14 represents the 14th week of 2022
  • yyyy-mm-ddYhh:mm:ss:mil is the fully defined date and time.
  • PD3 represents a period of 3 days
  • PH2.5 represents a period of 2.5 hours
  • PH2M30S15 represents a period of 2 hours, 30 minutes and 15 seconds

CSS

Importing a CSS file:

  1. In HTML, between head tags <link rel="stylesheet" href="url">
  2. In CSS, to import another CSS file @import (filename.css).

A CSS file can include formatting for both classes and ids. In HTML, we see <p class="abc" id="def>.

CSS represents this like this:

#def{
}

.abc{
}

CSS Colors

There are many ways to define colors

  1. #aabbcc
  2. #abc
  3. named color such as blue
  4. rgb(int, int, int
  5. rgba(int, int, int, int) where the last int represents transparency (between 0.0 to 1.0)
  6. hsl(int, int, int) h: hue, s: saturation. l: lightness
  7. hsla(int, int, int, int: This is likehsl(int,int,int)` but with transparency argument

Base path

base tag can be used within head tags. <base href="url" target=""/>

With the help of this, links on the page can be given to relative paths.

⚠️ **GitHub.com Fallback** ⚠️