| HTML | Meaning and Content |
| CSS | Presentation & Style |
| JavaScript & jQuery | Scripting, manipulating the DOM |
Excellent resource: W3 Schools
HTML elements are essential building blocks of an html document.
<!DOCTYPE html>
<html lang="en"></html>
<head></head>
<title></title>
<body></body>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html><h1>Heading level One</h1>
<h2>Heading level Two</h2>
<h3>Heading level Three</h3>
<h4>Heading level Four</h4>
<h5>Heading level Five</h5>
<h6>Heading level Six</h6>
<p> > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
Stand-alone tag
Called a void element in HTML5
Causes the next element or text to display on a new line
…text goes here <br> This starts on a new line….
<hr >
<b></b>
<strong></strong>
<i></i>
<em></em>
Phrase elements can be used together to provide different styling within a paragraph
<p><i>Call for a free quote for your web development needs: <strong>888.555.5555 </strong></i></p>
Displays information with bullet points
<ul></ul>
Contains the unordered list
List Item Element
<li></li>
Contains an item in the list
Conveys information in an ordered fashion
<ol></ol>
Contains the ordered list
List Item Element
<li></li>
Contains an item in the list
The Description List element
<dl></dl> tag
Contains the definition list
The dt Element
<dt></dt> tag
Contains a term or name
The dd Element
<dd></dd> tag
Contains a definition or description
Indents the text
Uses:
<ul></ul>
<ol></ol>
<dl></dl>
Purpose:
Example:
<body>
<header> document headings go here </header>
<nav> main navigation goes here </nav>
<div> main content goes here </div>
<footer> document footer information goes here </footer>
</body>
◦
<a href="./index.html">Home</a> <br>
<a href="./demo.html">Demo Page</a>
href Attribute
<a href="http://yahoo.com">Yahoo</a>
Link to pages on your own site
<nav>
<a href="./index.html">Home</a> <br>
<a href="./demo.html">Demo Page</a>
</nav>
HTML elements have default display values depending on the type of element.
Two categories of elements:
Examples include
<form> |
<p> |
<table> |
<hr> |
<h1> |
<ol> |
<li> |
<div> |
<div class="myDiv">
<h2>This is a heading in a div element</h2>
<p>This is some text in a div element.</p>
</div>Simple example
<div class="myDiv">
<h2 style="color: red;">This is a heading in a div element</h2>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
<li>Yummy Cheescake</li>
</ul>
<p>This is some text in a div element.</p>
</div>More complex example
Examples include
<a> |
<em> |
<strong> |
<img> |
<sub> |
<button> |
<input> |
<span> |
<p>My mother has <span style="color:blue">blue</span> eyes. Her name is
<em>Isabella</em> and she has the <strong>cutest</strong>
dog named Jezzie!</p><a href="https://www.w3schools.com">Visit W3Schools</a>
<img src="img_girl.jpg">
<img src="img_girl.jpg" width="500" height="600">
<img src="img_girl.jpg" alt="Girl with a jacket">
<img src="img_typo.jpg" alt="Girl with a jacket">
<p style="color:red;">This is a red paragraph.</p>
<html lang="en"></html>
<html lang="en-US"></html>
<p title="I'm a tooltip">This is a paragraph.</p>A global attribute. Used to uniquely identify an element (from CSS or Javascript).
<!DOCTYPE html>
<html>
<head>
<style>
#myHeader {
background-color: lightblue;
color: black;
padding: 40px;
text-align: center;
}
</style>
</head>
<body>
<h1 id="myHeader">My Header</h1>
</body>
</html>Used to make this element a member of a named class. Also a global attribute.
<!DOCTYPE html>
<html>
<head>
<style>
.city {
background-color: tomato;
color: white;
border: 2px solid black;
margin: 20px;
padding: 20px;
}
</style>
</head>
<body>
<div class="city">
<h2>London</h2>
<p>London is the capital of England.</p>
</div>
<div class="city">
<h2>Paris</h2>
<p>Paris is the capital of France.</p>
</div>
<div class="city">
<h2>Tokyo</h2>
<p>Tokyo is the capital of Japan.</p>
</div>
</body>
</html>Integrated Development Environments
Free, online resource
Also has a lot of tutorials
Free, online resource
Has a lot of tutorials
Free, online resource
for coding and teaching
Free downloadable IDE
I recommend VS code
<h1>Heading 1 </h1>
<h2>Heading 2 </h2>
<h3>Heading 3 </h3>
<h4>Heading 4 </h4>
<h5>Heading 5 </h5>
<h6>Heading 6 </h6>
<p>Some text in a paragraph.</p>
<ol>
<!--This is a comment -->
<li>First item</li>
<li>Second item</li>
</ol>
<ul>
<!--This is a comment -->
<li>First item</li>
<li>Second item</li>
</ul>
<!--Absolute Link - link to other pages-->
<a href="https://www.google.com">Link to Google</a>
<!--Relative Link- link to a page within your site-->
<a href="index.html">Home Page</a>"
<!--EMPTY Elements-->
<br>
<img src="SuperCoolPic.jpg" alt="SuperCoolPic" width="104" height="142">
<hr><p>HTML tables start with a table tag.</p>
<p>Table rows start with a tr tag.</p>
<p>Table data start with a td tag.</p>
<table>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>