Wednesday, February 20, 2019

Group 2:
Nick, Jamie, Gabby, Alex 

2. Explain the difference between HTML and CSS, and explain the ways they relate to each other. Compare the way you can use "inline styling" and the way you can activate an external style sheet. Give at least two examples of CSS styling.

HTML is the actual content of the page like written text and images, while CSS creates the style/design of a website, like layouts, and visual effects. Inline styling uses a specific HTML tag to style a specific page element. You can activate an external style sheet through a separate CSS document:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>

2 examples of CSS styling: 

Element Selector:

<!DOCTYPE html>
<html>
<head>
<style>
p {
  text-align: center;
  color: red;
</style>
</head>
<body>

<p>Every paragraph will be affected by the style.</p>
<p id="para1">Me too!</p>
<p>And me!</p>

</body>
</html>


Border color:

<!DOCTYPE html>
<html>
<body>

<h1 style="border: 2px solid Tomato;">Hello World</h1>

<h1 style="border: 2px solid DodgerBlue;">Hello World</h1>

<h1 style="border: 2px solid Violet;">Hello World</h1>

</body>
</html>

No comments: