Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction.
Some "rules"
1 This one's important
Tell us about yourself.
HTML is the code that allows us to build websites
If you 'view the source', you see this
How your computer accesses websites
A website is a way to present your content to the world, using HTML and CSS to present that content & make it look good.
< >
Angle brackets. HTML.
Every piece of content involves these.
A paragraph is your content
<p>A paragraph is your content</p>
A paragraph is your content
<p>There's a tag on the left and a tag on the right.</p>
<strong>This is an HTML element, right here</strong>
<tagname>Stuff in the middle</tagname>
<p> This is a sample paragraph.</p>
<br>
<img>
<hr>
<a href="http://johndavidback.com">A smart dude's
website</a>
<img src="my.picture.jpg"/>
We covered:
Do all of those things make some sort of sense?
Okay, let's build a skeleton!
The first thing on an HTML page is the doctype, which tells the browser which version of the markup language the page is using.
Here's the doctype we use to tell the browser "Hey, this is HTML5, buddy"
<!DOCTYPE html>
After <doctype>, the page content must be contained between <html> tags.
<!DOCTYPE html>
<html>
STUFF GOES HERE
</html>
The head contains meta information about the page.
The body contains the actual content of the page.
This is the basis of a complete HTML web page.
<!DOCTYPE html>
<html>
<head>
<title>Title of the page</title>
</head>
<body>
The page content here.
</body>
</html>
All elements "nest" inside one another
Whichever element OPENS first CLOSES last
So, you could put a link into a paragraph. Very common.
<p>I want you to visit <a href="http://google.com/">this site</a>,
soon!</p>
What would that look like?
I want you to visit this site, soon!
Yay!!
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
<p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
Paragraph 1
Paragraph 2
Paragraph 3
* White space is only for humans!
<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 number indicates hierarchy, not size. Think: Outlines from high school papers
<ul>
<li>List Item</li>
<li>AnotherList Item</li>
</ul>
<ol>
<li>List Item</li>
<li>AnotherList Item</li>
</ol>
Unordered list (bullets)
Ordered list (sequence)
<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
* Notice: This tag is our first example of a stand-alone or "self-closing" element. A break can't contain anything.
So far, we have mostly seen "block" elements
They appear on the next line, like paragraphs
There are also "inline" elements
They appear on the same line that they are written on.
<p>
Here is a paragraph with <em>Emphasized</em> text and <strong>Important</strong> text.
</p>
Here is a paragraph with Emphasized text and Important text.
* Notice: 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.
We are going to start building a personal site.
<!DOCTYPE html>
<html>
<head>
<title>My great site by John</title>
</head>
<body>
<p>What a great body</p>
</body>
</html>
You can steal the above code right here. Just right-click, 'view source', and then copy and paste.
Links have three components
<a href="http://www.girldevelopit.com" title="Girl Develop It Homepage">GDI</a>
What does HREF mean? Could be one of a few things.
Images also have three components
<img src="http://www.placecage.com/c/460/300" alt="Nic Cage"/>
Add images and links to your funky webpage!
Feel free to get crazy...
<a href="http://placecage.com/" title="PlaceCage">
<img src="http://www.placecage.com/c/460/300" alt="Girl Develop It Logo"/>
</a>
<table>
<tr>
<th>Head</th>
<th>Head</th>
</tr>
<tr>
<td>Data</td>
<td>Data</td>
</tr>
</table>
Johnny don't like tables for layouts, and neither does W3C.
Head | Head |
---|---|
Data | Data |