CSS

From NoskeWiki
Jump to navigation Jump to search

About

I use CSS (Cascading Styles Sheets) quite regularly, but I'm only just starting to learn how to do flyout menus... below are some links which have helped me.


Child Pages

Related/Child Pages:


Internal Style Sheet

To declare CSS inside the HTML:

<!doctype html>
<html lang="en">
<head>
  <title>Internal/Inline Stylesheet Example</title>
  <style>
body {
  background-color: linen;
}
h1 {
  color: maroon;
  margin-left: 40px;
}
  </style>
</head>
<body>
<h1>Title</h1>
Normal text
</body>
</html>

External Style Sheet

Usually near though, is to put the CSS into an external file, and then link in:

example.html:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>External Style Sheet Example</title>
  <link rel="stylesheet" href="example_styles.css?v=1.0">
</head>
<body>
<h1>Title</h1>
Normal text
</body>
</html>

example_styles.css:

/* Only forwardslash star comments are allowed */
body {
    background-color: linen;
}
h1 {
    color: maroon;
    margin-left: 40px;
}


Related Pages


Links