Presentation available at: http://kansascitywomenintechnology.github.io/IntroToHTMLAndCSS
Software Engineer, The Nerdery - Chicago
"Tangible dates lead to tangible results. 'Someday' leads to regret. Plan your dreams now. With spreadsheets."
Read more about Laura on the Nerdery's Blog!Senior Software Engineer, Engaged Technologies - Kansas City
We talked about tools for your #LadyDev toolbelt:
Developer Tools in Chrome - for troubleshooting and exploring elements Sublime Text - your text editor GitHub - where you can store and share your work
Hyper Text Markup Language
***
HTML is used for the placement or meaning of the content - header, paragraph, list versus its style (font, color, font size)
***
Text is marked with a "tag" that gives it a purpose
Meta Data is invisible to the reader but gives the browser important information about how to interpret the HTML on the page.
<!DOCTYPE html> <html> <head>Meta Data Goes Here </head> <title>Brower tab title here </title> <body> <h1>My First Heading</h1> <p>This is the first paragraph. All visible page content is nested inside the opening and closing body tags.</p> </body> </html>
Paragraph:
<p> content goes here </p>
Headings (1-6):
<h3> header content goes here </h3>
Ordered lists:
<ol> <--"ol" designates the start of an ordered list <li>list item 1 here</li> <li>list item 2 here</li> <li>list item 3 here</li> the closing tag marks the end of the list:--> </ol>
Hyperlink:
<a href="www.url.com"> URL Name </a>
Images:
<img src="location/imgname.jpg" alt="image name">
Image with Hyperlink:
<a href="www.URL.com"><img border="0" src="location/LL-53.jpg" width="300" height="404" alt="Alternate Name"</a>
Note: For details or more examples, start with your handout and then use W3Schools' tutorial as a desk reference.
Inline formatting specifies the look of the element. While it can be done in HTML, it should be done in CSS whenever possible because it is easier to maintain.
<h3 style="color:blue;"> My Title Should Be Blue </h3>
becomes. . .
<ol> <li>list item 1.</li> <li>list item 2.</li> </ol>;
Don't try to mash your code together. Use enough line breaks for readability and clarity.
***
Validate often - save your work and see how it looks in-browser as you progress.
***
Next: Debugging!
There are many tools you can use. Some are built into your text editor and some are separate. Here are some resources.
Cascading Style Sheets (CSS) ***
CSS does the heavy lifting with regard to the page formatting. ***
CSS controls how elements look, including font color, size, and other details that pertain to all elements in an HTML document that are the same type.
Image Credit:
LearnWebCode.comImage Credit:
Fiercegirldesign.comBox model - a visual frame of reference for margins around elements
The Meta Data Section of your HTML doc tells the browser to look for a corresponding stylesheet:
<!DOCTYPE html> <html> <head> <link type="text/css" rel="stylesheet" href="stylesheet.css"/> <title>Page Title</title> </head> <body> <h3>heading content</h3> <p>Some Content here</p> </body> </html>
The CSS Stylesheet (href="stylesheet.css" in the previous slide) describes how the heading and paragraph will look:
body { background-color: #b7d1c4 } h3 { font-family: Verdana; font-weight: bold; text-align: center; padding-top: 25px; padding-bottom: 25px; color: #acd1b2; }
Next month: Introduction To Command Line
March: GitHub Basics