HTML, CSS, & JavaScript All-In-One For Dummies Cheat Sheet
HTML, CSS, & JavaScript All-In-One For Dummies Cheat Sheet
HTML, CSS, & JavaScript All-In-One For Dummies Cheat Sheet
Home / Technology Articles / Programming & Web Design Articles / General Programming & Web Design Articles
One of the bonuses you get when you tackle From Category
HTML, CSS, & JavaScript All-
in-One For Dummies HTML, CSS, and JavaScript is that after you learn
General Programming &
a few basics, you can apply those basics to any
Web Design
project. A good example is the underlying
structure of a page, which uses the same set of
standard HTML tags, no matter how large or
small the project. Using DevOps To Improve Engineering
1 of 8 4/27/2024, 12:40 AM
HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet https://www.dummies.com/article/technology/programming-web-design/general-programming-web-...
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=de
vice-width, initial-scale=1.0">
<title>Barebones HTML Template</title>
<style>
/*
* Put your internal styles here or
replace with
* <link href="filename.css" rel="s
tylesheet">
*/
</style>
</head>
<body>
<header>
<h1>Site Title</h1>
</header>
<nav>
Navigation links
</nav>
<main>
<article>
<h2>Article Title</h2>
</article>
<aside>
<h3>Aside Title</h3>
</aside>
</main>
<footer>
Footer stuff
</footer>
<script>
/*
* Your internal JavaScript goes he
re.
* Alternatively, replace with
* <script src="filename.js"></scri
pt>
*/
</script>
</body>
</html>
2 of 8 4/27/2024, 12:40 AM
HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet https://www.dummies.com/article/technology/programming-web-design/general-programming-web-...
HTML:
<element class="class-name">
CSS:
.class-name {
property1: value1;
property2: value2;
etc.
}
The id selector
HTML:
<element id="id-name">
CSS:
#id-name {
property1: value1;
property2: value2;
etc.
}
element {
property1: value1;
property2: value2;
etc.
}
3 of 8 4/27/2024, 12:40 AM
HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet https://www.dummies.com/article/technology/programming-web-design/general-programming-web-...
element[attr="value"] {
property1: value1;
property2: value2;
etc.
}
ancestor descendant {
property1: value1;
property2: value2;
etc.
}
reference ~ target {
property1: value1;
property2: value2;
etc.
}
reference + target {
property1: value1;
property2: value2;
etc.
}
4 of 8 4/27/2024, 12:40 AM
HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet https://www.dummies.com/article/technology/programming-web-design/general-programming-web-...
element:first-child {
element:last-child {
property1: value1;
property2: value2;
etc.
}
element:nth-child(n) {
element:nth-last-child(n) {
property1: value1;
property2: value2;
etc.
}
element:is(selector-list) {
property1: value1;
property2: value2;
etc.
}
element:where(selector-list) {
property1: value1;
property2: value2;
etc.
}
element:not(selector-list) {
property1: value1;
property2: value2;
etc.
}
5 of 8 4/27/2024, 12:40 AM
HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet https://www.dummies.com/article/technology/programming-web-design/general-programming-web-...
element:has(selector-list) {
property1: value1;
property2: value2;
etc.
}
console.log(output);
6 of 8 4/27/2024, 12:40 AM
HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet https://www.dummies.com/article/technology/programming-web-design/general-programming-web-...
7 of 8 4/27/2024, 12:40 AM
HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet https://www.dummies.com/article/technology/programming-web-design/general-programming-web-...
Copyright @ 2000-2024 by John Wiley & Sons, Terms of Use Privacy Policy Cookies Settings Do Not Sell My Personal Info - CA Only
Inc., or related companies. All rights reserved,
including rights for text and data mining and
training of artificial technologies or similar
technologies.
8 of 8 4/27/2024, 12:40 AM