From 825282fea9102326ad2538e4a98329fbd38c899b Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 29 Jun 2021 08:30:52 -0400 Subject: firststuffs --- html4.html | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 html4.html (limited to 'html4.html') diff --git a/html4.html b/html4.html new file mode 100644 index 0000000..39475b9 --- /dev/null +++ b/html4.html @@ -0,0 +1,99 @@ + + + + Doing HTML Right – LandChad.net + + + + + + + +

Doing HTML Right

+ +
+ +

+ We've noted that HTML is very forgiving +

+ +

A look at a decent template

+ +

+ I have a template file that I use for this website that includes all the basics. + When I make a new page, I just copy the template and add the content. + Here is what the template looks like: +

+
<!DOCTYPE html>
+<html lang=en>
+    <head>
+        <title>Your page title</title>
+        <meta charset="utf-8"/>
+        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
+        <link rel='stylesheet' type='text/css' href='style.css'>
+        <meta name="viewport" content="width=device-width, initial-scale=1">
+        <link rel='alternate' type='application/rss+xml' title='Site Title RSS' href='/rss.xml'>
+    </head>
+<body>
+    <header><h1>Your page title</h1></header>
+
+    <nav></nav>
+
+    <main>
+
+    Put all your page content here in the <main> tag.
+
+    </main>
+
+    <footer></footer>
+</body>
+</html>
+ +

Explanation of All These Important Things

+ + + +

The Importance

+ +

+ If you're new to this world, you might be wondering why you should use body and main and nav and header and all this seemingly confusing stuff! + (Especially when even bad HTML displays!) +

+ +

+ Not only do many devices, especially mobile ones, specifically use these tags for their features, but + when using CSS, we can also style each of these elements the way you want them to appear without changing the HTML on all your pages. +

+ +

+ With CSS, we can say that we might want the whole body to have a image background, but main should be floating over it semi-transparent. + We can tell nav to float off on the left or right and we can change footer and nav settings just by tweaking the CSS. +

+ +

+ Speaking of which, we've been talking up CSS for a while, so now it's time to learn it! +

+ + Next: Styling with CSS + +
+ + + -- cgit v1.2.3