Step Two
1. Tags
Two Types of Tags There are tags for structure (think of them as boxes), and there are tags for text.
STRUCTURE TAGS
Structure tags function as boxes, they developed from <div>
tags.
Note: 99.9% of all tags work in pairs — a beginning and an end tag. Example: <h1>Title</h1>
Common strucuture tags include:
<header> </header>
<nav> </nav>
<main> </main>
<article> </article>
<section> </section>
<footer> </footer>
<aside> </aside>
Note: any name can be used for a class or ID <div>
(division) tag.
TEXT TAGS
Text tags give hierarchy to the text. They were part of the original concept for HTML.
Common text tags include:
<h1> </h1>
(largest title)
<h2> </h2>
<h3> </h3>
<h4> </h4>
<h5> </h5>
<h6> </h6>
(smallest title)
Note: "h" stands for headline.
Other text tags include
Bold
<b> </b>
Another form of bold
<strong> </strong>
Italic
<i> </i>
Emphasis/another form of italic
<em> </em>
Paragraph, used for all body copy
<p> </p>
Display code (You still must replace the angle brackets with html symbols)
<code> </code>
Give a section or span of text a slightly different style
<span> </span>
Forced line break (Strangely this tag only has one part)
<br>
2. Links (Anchors)/Linking Pages
Some HTML History
<a>
to represent links
Creating a Hyperlink in Dreamweaver
There you have the following options:
3. Media Queries
Purpose
Media Queries enable websites to seamlessly adjust to various screen sizes, improving usability across devices like smartphones, tablets, and desktops. They allow for adjustments in layout, font size, color, and element visibility without the need to alter HTML code, ensuring content is accessible and legible on any device.
The Code
Media queries are incorporated within the CSS file of a website. Their syntax begins as follows:
@media only screen and (max-width: ___px) {
/* CSS rules */
}
}
. It’s a common error that can disrupt the functionality of your CSS.
In development environments, media query syntax often appears in teal, distinguishing it easily. The closing curly brace, though it may seem extraneous, is essential for the proper execution of your CSS.
Best Practices
Focus on modifying only what's necessary across different screen sizes. Avoid replicating CSS rules that are consistent across devices. Implement a foundational CSS for all devices, and use media queries for specific alterations.
Example: To hide an image on screens narrower than 990px:
@media only screen and (max-width: 990px) {
.image-selector {
display: none;
}
}
CSS cascades; styles in your foundational CSS (the bundle) extend to all screen sizes unless overridden in a media query. This ensures a smooth transition across various devices.