+
+
+
<h1>Heading 1</h1>
+<h2>Heading 2</h2>
+<h3>Heading 3</h3>
+<h4>Heading 4</h4>
+<h5>Heading 5</h5>
+<h6>Heading 6</h6>
+
+
+
Heading 1
+ Heading 2
+ Heading 3
+ Heading 4
+ Heading 5
+ Heading 6
+
+
+
* Heading number indicates hierarchy, not size.
Think of outlines from high school papers.
+
+
+
+
+ Let's Develop It!
+ A basic page about your favorite television show.
+
+ - Include an h1 header.
+ - Add additional headings for potential sections of your page.
+
+ *IMPORTANT: A page can contain only ONE h1 tag.
+
+
+
+
+ Paragraphs
+ Paragraphs allow you to format your content in a readable fashion.
+
+ * You can edit how paragraphs are displayed with CSS.
+
+
+
+ Element: Paragraph
+
+
+
<p>Paragraph 1</p>
+<p>Paragraph 2</p>
+<p>Paragraph 3</p>
+
+
<p>Paragraph 1</p> <p>Paragraph 2</p>
+
+
<p>Paragraph 1</p>
+
+<p>Paragraph 2</p>
+<p>Paragraph 3</p>
+
+
+
+
Paragraph 1
+
Paragraph 2
+
Paragraph 3
+
+
* White space in your editor is only for humans. You can write your code with any spacing. But it's better to write code in a formatted structure or use a linter to clean up formatting issues.
+
+
+
+
+
+
+ Formatted Text
+
+
<p>This paragraph has <em>emphasized</em> text
+and <strong>important</strong> text.</p>
+
+
This paragraph has emphasized text and important text.
+
+ * em
and strong
are meant to indicate meaning through style. If you want to have italicized for appearance and not to communicate meaning, you should use CSS.
+
+
+
+
+ Let's Develop It!
+ Add on to the page for your favorite television show.
+
+ - Text! You can either copy and paste from a Wikipedia article, or generate text from an Ipsum like Hipster Ipsum.
+ - Add paragraph tags to break up your text into at least 2 paragraphs.
+ - Add formatting tags to emphasize "important" words.
+
+
+
+
+
+ Element: Line Break
+
+
+
<p>
+Imagine there's no Heaven<br/>It's
+easy if you try <br/>No hell below
+us <br/>Above us only sky
+</p>
+
+
+
+
Imagine there's no Heaven
It's easy if you try
No hell below us
Above us only sky
+
+
+
+
+
+
+ Self Closing Tags
+ These elements don't need a closing tag:
+<br/>
+<hr/>
+<img/>
+<link/>
+<input/>
+
+
+
+
+
+ Let's Develop It!
+ Add a break tag or a horizontal rule to your code.
+
+
+
+
+ Lists
+ Lists can be used to organize any list of items.
+
+ You'd be surprised how often lists are used in web design.
+
+
+
+ Unordered and ordered lists
+
+
+
<ul>
+ <li>List Item</li>
+ <li>Another List Item</li>
+</ul>
+
+
+
+
+ - List Item
+ - Another List Item
+
+
+
+
+
+
+
<ol>
+ <li>List Item</li>
+ <li>Another List Item</li>
+</ol>
+
+
+
+
+ - List Item
+ - Another List Item
+
+
+
+
+
+
+
+ Let's Develop It!
+
+ - Add an unordered list of characters from your favorite show to your code.
+ - Add an ordered list of seasons or episodes to your code.
+ - EXTRA CHALLENGE:
+
+ - Nest an ordered list in an unordered list
+
+
+
+
+
+
+
+ Element Details: Attributes
+
+ - Attributes describe additional characteristics of an HTML element
+ - An attribute has 2 parts: Name & Value.
+
+
+<tagname name="value">content</tagname>
+ *Values should be contained inside quotation marks.
+
+
+
+
+ Images
+ To make an image, you need 3 parts:
+
+ - An image tag:
<img />
+ - A
src
attribute: the location and name of the image file
+ - An
alt
attribute: a brief description of the image content
+
+
+
+
+ Images
+
+
+
<img src="img/example-gdi-logo.png"
+alt="Girl Develop It logo"/>
+
+
+
+

+
+
+
+
+
+
<img src="img/blinkylights.gif"
+alt=""/>
+
+
+
+

+
+
+
+
+
+
+ Let's Develop It!
+
+ - Using the img tag, add an image of your TV show to your page.
+
+ - Tip: Do an online search; copy an image link from the web.
+
+
+ - Include an ALT attribute in the img tag.
+
+
+
+
+
+ Links
+ To make a link, you need 3 parts:
+
+ - An anchor tag:
<a></a>
+ - An
href
attribute: the web address to where the link points
+ - content: text or images between the tags that become the clickable link.
+
+<a href="http://www.girldevelopit.com">Girl Develop It</a>
+
+ produces:
+ Girl Develop It
+
+
+
+
+
+
+ Link Targets
+ An optional target
attribute tells the browser to open the link in a new tab.
+<a href="http://www.girldevelopit.com" target="_blank">Girl Develop It</a>
+ Opens the GDI site in a new tab:
+ Girl Develop It
+
+
+
+
+
+ Let's Develop It!
+ Add 2 or more links about your show that open up in a new tab.
+
+
+
+
+
+ Comments
+ You can add comments to your code that will not be displayed by the browser, but only visible when viewing the code.
+<!-- Comment goes here -->
+
+
+
+
+ Comments
+ Comments can be used to organize your code into sections so you (or someone else) can easily understand your code. It can also be used to 'comment out' large chunks of code to hide it from the browser.
+<!-- Beginning of header -->
+<div id="header">Header Content</div>
+<!-- End of header -->
+
+<!--
+<ol>
+<li>List Item</li>
+<li>Another List Item</li>
+</ol>
+-->
+
+
+
+
+
+
+
+
+
+
+ CSS: What is it?
+ CSS = Cascading Style Sheets
+ CSS is a "style sheet language" that lets you style the elements on your page.
+ CSS is works in conjunction with HTML, but is not HTML itself.
+
+
+
+ CSS: What can it do?
+ All colored text, position, and size
+
+
+
+
+
+ Anatomy of CSS
+ CSS consists of style rules.
+ Each style rule consists of a selector and declarations of property-value pairs:
+
+selector {
+ property: value;
+ property: value;
+}
+
+
+
+ Syntax
+selector {
+ property: value;
+ property: value;
+}
+ Example:
+body {
+ color: yellow;
+ background-color: black;
+}
+
+
+
+
+ Connecting CSS to HTML
+ 3 Ways:
+ Inline
+ Embedded
+ External
+
+
+
+
+ Connecting CSS to HTML: Inline
+<p style="color:red">Some text.</p>
+
+
+ - Uses the HTML
style
attribute.
+ - Only applies to one element at a time.
+ - Not preferred.
+
+
+
+
+
+ Connecting CSS to HTML: Embedded
+<head>
+ <style>
+ p {
+ color: blue;
+ font-size: 12px;
+ }
+ </style>
+</head>
+
+
+ - Inside
<head>
element.
+ - Uses
<style>
tag.
+ - Only applies to that page.
+
+
+
+
+
+ Connecting CSS to HTML: External
+<head>
+ <link rel="stylesheet" href="style.css">
+</head>
+
+
+ - Can be referenced from multiple pages.
+ - Reduced file size & bandwidth.
+ - Easier to maintain in larger projects.
+ - This is the best practice!
+
+
+
+
+
+ Let's Develop It!
+ Embedded CSS:
+
+ - In the
head
tag of your index.html file, beneath the title tag, add an opening and closing style
tag.
+ - Add / nest the CSS rule below in the
style
tag:
+
+body {
+ background-color: turquoise;
+}
+
+ - Check your page and see what happens.
+
+
+
+
+
+ CSS: The Selector
+selector {
+ property: value;
+ property: value;
+}
+
+ The selector is used to select which elements in the HTML page will be given the styles inside the curly braces.
+
+
+
+
+ Types of Selectors: Element
+p {
+property: value;
+}
+
+ Selects all paragraph elements.
+img {
+property: value;
+}
+
+ Selects all image elements.
+
+
+
+
+
+
+
+ Property: color
+ The color
property changes the color of the text.
+p {
+ color: red;
+}
+
+
+
+
+
+ Property: background-color
+ The background-color
property changes the color of the background.
+body {
+ background-color: hotpink;
+}
+
+
+
+
+
+ CSS Color Values
+ Your browser can accept colors in many different ways:
+
+
+
+ Color name: |
+ red |
+
+
+ Hexadecimal value: |
+ #FF0000 |
+
+
+ RGB value: |
+ rgb(255, 0, 0) |
+
+
+
+ W3Schools Color Picker
+ CSS Color Names
+
+
+
+
+ Let's Develop It!
+ Colors!
+
+ - Change the background color of your site. Use a color name, hexcode or RGB value
+ - Change the font color of one or all of your heading.
+
+
+
+
+ Property: font-size
+ The font-size
property specifies the size of font.
+body {
+ font-size: 12px;
+ font-size: 1.5em;
+ font-size: 100%;
+}
+
+
+
+
+ Font-size units:
+
+ - Pixels - "px"
+ - "rem" or "em"
+ - Percentage - %
+ - xx-small, medium, large, x-large, etc
+
+
+ font-size property (MDN)
+
+
+
+
+ Property: font-family
+ The font-family property defines which font is used.
+p {
+ font-family: "Times New Roman"; /* Specific font name */
+ /* or */
+ font-family: serif; /* Generic name */
+ /* or */
+ font-family: "Arial", sans-serif; /* Comma-separated list */
+}
+
+ *When listing multiple fonts, always list a generic name last.
+ Web Safe Fonts (W3 School)
+ Google Fonts
+
+
+
+
+ Let's Develop It!
+ Typography
+
+ - Change the font-size of your h1 element. Use the px unit.
+ - Change the font-size of other elements on your page (headings or paragraphs).
+ - Give your headings and/or paragraphs a different font type.
+
+
+
+
+
+ Let's Develop It!: Extra Tips
+
+ - Centering your entire page
+ - (Re)Sizing your images
+ - Checking for responsiveness (Using Dev Tools)
+
+
+
+
+
+
+
+
+ Share What You've Built!
+
+
+
+
+
+ Give Us Your Feedback
+
+
+
+
+
+
+
+
+ External Resources
+ Free Code Camp
+ Codecademy
+ CSS Tricks
+ Udemy
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Thank You!
+
+
+
+