- What is HTML? content, markup, structure, what oy uhave to say
- What is CSS? style
- Which is more important?
<!DOCTYPE html>
<html>
<head>
<title>A Basic HTML Template</title>
</head>
<body>
<!-- all content here -->
</body>
</html>
only whars is a the "body" element will shoe on screen
Tags should be chosen based on the semantic value of the content the content determins the tag
Tags should NEVER be chosen based on presentation, or look
This means that these tags are essentially off-limits
<big>
, <small>
, <i>
, <b>
, <br />
,
, <hr />
They have no semantic value. but they pretend to.
Anytime you catch yourself thinking...
"I should use x because I need it to look like ..."
✋
- It pleases Google.
- Easier for its algorithm to crawl and index site
- Meaning a better ranking in search results
- Less of a need to "game" the Google algorithm
goog HTML makes it easier for screenreaders to interpert the content and make it accesible.
- On June 21, 2019, The Accessible Canada Act became law after receiving Royal Assent.
- Fines of up to $250,000. 😬
🙏 Always write good HTML. 🙏
- Block-level elements - each block in "under" the previous. a new line
<h1>
-(there should be only one h1 on a page),<h2>
,<h3>
,<h4>
,<h5>
,<h6>
,<p>
<ul>
,<ol>
,<li>
,<blockquote>
- ,<table>
- kinda like spreadsheet,<form>
- filling a form<div>
- no semantic value, we use it a a box of contant for styling.
- Inline elements - won't move the contant to a new line
<img>
,<a>
- link,<span>
- mini<div>
for in line values,<button>
<input>
,<label>
,<select>
,<textarea>
<abbr>
- abbreviation, when hovering it will show ontop
<header>
,<footer>
,<nav>
- navigation bar,<section>
,<main>
- the box of the sections and articles,<aside>
<figure>
- for example if the image in a chart r a gif,<figcaption>
,<summary>
<time>
,