Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...
HTML, CSS, and j■vascript All-in-One For Dummies 1st Edition Paul Mcfedries
https://ebookmass.com/product/html-css-and-j%d0%b0vascript-all-in-onefor-dummies-1st-edition-paul-mcfedries/
ebookmass.com
Macs All-in-One For Dummies 6th Edition Paul Mcfedries
https://ebookmass.com/product/macs-all-in-one-for-dummies-6th-editionpaul-mcfedries/
ebookmass.com
Sams Teach Yourself HTML, CSS, and JavaScript All in One 1st Edition Julie C. Meloni
https://ebookmass.com/product/sams-teach-yourself-html-css-andjavascript-all-in-one-1st-edition-julie-c-meloni/
ebookmass.com
Psychology
and
Law: Research and Practice
https://ebookmass.com/product/psychology-and-law-research-andpractice/
ebookmass.com
Thug (a sweet and spicy Mafia romantic suspense) (Something Real Book 3) Leslie Georgeson
https://ebookmass.com/product/thug-a-sweet-and-spicy-mafia-romanticsuspense-something-real-book-3-leslie-georgeson/
ebookmass.com
Hegel: the Phenomenology of Spirit G.W.F Hegel
https://ebookmass.com/product/hegel-the-phenomenology-of-spirit-g-w-fhegel/
ebookmass.com
Rock Mechanics and Engineering: Prediction and Control of Landslides and Geological Disasters Helin Fu
https://ebookmass.com/product/rock-mechanics-and-engineeringprediction-and-control-of-landslides-and-geological-disasters-helinfu/
ebookmass.com
Corporate Governance and Organisational Performance: The Impact of Board Structure 1st ed. Edition Naeem Tabassum
https://ebookmass.com/product/corporate-governance-and-organisationalperformance-the-impact-of-board-structure-1st-ed-edition-naeemtabassum/
ebookmass.com
Open Arms (The Sabela Series Book 7) Tina Hogan Grant
https://ebookmass.com/product/open-arms-the-sabela-series-book-7-tinahogan-grant/
ebookmass.com
The Palgrave Handbook of Leninist Political Philosophy 1st ed. Edition Tom Rockmore
https://ebookmass.com/product/the-palgrave-handbook-of-leninistpolitical-philosophy-1st-ed-edition-tom-rockmore/
ebookmass.com
Contents at a Glance
Book 1: Getting
Book 2: Learning HTML
CHAPTER 1: Building Good Bones: Structuring
CHAPTER 2: Adding Links,
Working
CHAPTER 4: Building Tables with Your Bare Hands
CHAPTER 5: Using Forms to Make a Page Interactive
CHAPTER 6: Making
Book 3: Learning CSS Basics
CHAPTER 1: Figuring Out the CSS Box Model
CHAPTER 2: Getting to Know the CSS Selectors
CHAPTER 3: Pseudo School: Learning Pseudo-Classes and Pseudo-Elements
CHAPTER 4: Making
CHAPTER 5: Taking the Measure of
CHAPTER 6: Fancifying Pages with Colors and Backgrounds
CHAPTER 7: Taking Your Text Up a Notch with Web Typography
Book 4: Building Dynamic Pages with JavaScript
CHAPTER 1: JavaScript: The Bird’s-Eye View
CHAPTER 2: Understanding Variables
CHAPTER
CHAPTER 5: Harnessing the Power of Functions
CHAPTER 6: Playing with the Document Object Model
CHAPTER 7: Working with Arrays
CHAPTER 8: Manipulating Strings, Dates, and Numbers
CHAPTER 9: Storing User Data in the Browser
CHAPTER 10: Debugging Your Code
CHAPTER 11: Processing Form Data
Cruising along Server Street
Taking a walk down Local
The descendant combinator ( )
The child combinator (>)
The subsequent-sibling combinator (~)
The next-sibling combinator (+)
Selecting Elements by Attribute
CHAPTER 3: Pseudo School: Learning Pseudo-Classes and Pseudo-Elements
Scratching Your Head Over Pseudo-Classes
Introducing the pseudo-class
Styling elements with pseudo-classes
Matching child elements
Matching child elements by type
Matching form elements by state
Matching elements by user action
Matching links
Working with functional pseudo-classes
Getting Up to Speed with Pseudo-Elements
Working with pseudo-elements
Generating a last child with ::after
Generating a first child with ::before
Styling the opening letter with ::first-letter
Styling the opening line with ::first-line
CHAPTER 4: Making CSS Make Sense
Commenting Your CSS Code
Commenting non-obvious code
Marking stylesheet sections with comments
Popping
Taking Care of Your Text
Getting to know typefaces (and fonts, too)
All in the font family: Applying a typeface
Introducing the font stack
Generic font families
System font families
Web
The Typographic Trinity: Setting Type Size, Line Height, and Line Length
4: BUILDING DYNAMIC
Understanding Variables
Declaring
Checking
Naming Variables: Rules and Best Practices
Manipulating
The Web APIs: Some special objects
Getting
Specifying Elements
Specifying an element by id
Specifying elements by tag name
Specifying elements by class name
Specifying elements by selector
Working
Traversing the DOM
Getting
Getting
Manipulating Elements
Adding
Inserting
Changing
Tweaking
Removing
Logic
Getting to Know Your Debugging Tools
Debugging with the Console
Displaying the console in various browsers
Logging data to the Console
Executing code in the Console
Pausing Your Code
Entering break mode
Exiting break mode
Stepping Through Your Code
Stepping one statement at a time
Stepping into some code
Stepping over some code
Stepping out of some code
Monitoring Script Values
Viewing a single variable value
Viewing
Adding a watch expression
More Debugging Strategies
Looking
Taking Control of Flex Items
Allowing flex items to grow
Allowing flex items to shrink
Suggesting a flex item size
Using the flex shorthand property
Laying out content columns with Flexbox
Changing the order of flex items
CHAPTER 3: Laying Out a Page with CSS Grid
Introducing CSS Grid
Setting Up the Grid Container
Specifying the Grid Rows and Columns
Setting your own columns and rows: the explicit grid
Letting the browser do some of the work: the implicit grid
Creating grid gaps
Taking Control: Assigning Grid Items
Assigning grid items to columns and rows
Assigning grid items to named grid areas
What is a Responsive Layout?
Going with the Flow: Fluid Layouts
Taking advantage of viewport units
Querying Your
Interrogating the screen with media queries
Exploring
Pick a testing width that makes sense for your site
Get your content to scale with the device
Build your CSS the mobile-first way
Pick a “non-mobile” breakpoint that makes sense for your content
Introduction
Let me start off this book by letting you in on a little secret. If you talk to or read things written by people who make websites for a living, it’s all “HTML this” and “CSS that.” They go on and on about “tags” and “properties” and “collapsing margins” and blah blah blah. It can be more than a little intimidating, so you can easily come away with the idea that crafting a web page is really hard. You may end up believing that creating stuff for the web is a for-geeks-withCS-graduate-degrees-only business.
Okay, it’s time for that secret I just promised you. Ready? Come closer. Closer. Okay:
*whispers* Learning how to build web pages is not hard.
Sure, it sounds hard; and if you’ve ever taken a peek at some web page code, it certainly looks hard; and, I’ll admit, building a huge and insanely complex site like Amazon or Instagram really is hard. But creating a personal website? Not hard. Fabricating a site to showcase a hobby? Not hard. Crafting some pages for a local charity, team, or small business? You got it: Not hard!
Still don’t believe me? That’s okay, I get it: HTML, CSS, and JavaScript — the technologies that enable anyone to assemble web pages — have a reputation problem. After all, so the thinking goes, people have used HTML, CSS, and JavaScript to sculpt some truly sensational sites, so of course such sophistication must come with a near-vertical learning curve. Duh.
For years now I’ve talked to many smart people who believed all that and who therefore wouldn’t even dream of building a web page from scratch. How many awesome websites never got built because their would-be builders thought HTML, CSS, and JavaScript were well beyond their capabilities? Why is no one talking about how accessible these technologies really are?
After asking myself these questions over and over, I finally decided to do something about it. I decided to write this book, the aim of which is to prove to everyone — yes, even skeptical you — that the technologies behind the web are approachable, straightforward, and readily learnable.
About This Book
Welcome, then, to HTML, CSS, and JavaScript All-in-One For Dummies. This book gives you a complete education on the technologies that enable anyone to craft professional-looking web pages. You learn how to set up the tools you need, how to use HTML and CSS to design and build your site, and how to use JavaScript to program your pages. My goal is to show you that these technologies aren’t hard to learn, and that even the greenest rookie web designer can learn how to put together pages that will amaze their family and friends (and themselves).
If you’re looking for lots of programming history, computer science theory, and long-winded explanations of concepts, I’m sorry, but you won’t find it here. My philosophy throughout this book comes from Linus Torvalds, the creator of the Linux operating system: “Talk is cheap. Show me the code.” I explain what needs to be explained and then I move on without further ado (or, most of the time, without any ado at all) to examples and scripts that do more to illuminate a concept that any verbose explanations I could muster (and believe me, I can muster verbosity with the best of them).
Getting started with the book
How you approach this book depends on your current level of web coding expertise (or lack thereof):
» If you’re just starting out, begin at the beginning with Book 1 and work at your own pace sequentially through to Books 2 and 3. This will give you all the knowledge you need to pick and choose what you want to learn throughout the rest of the book.
» If you know HTML and CSS, you can probably get away with taking a fast look at Books 2 and 3, and then settle in with Book 4 and beyond.
» If you’ve done some JavaScript coding already, I suggest working quickly through the material in Book 4, and then exploring the rest of the minibooks as you see fit.
My “No AI” guarantee
As I began updating this edition of the book, the world was awash in posts and talk and endless speculation about artificial intelligence, to the point where it seemed we’d soon be welcoming our new AI overlords. That’s not likely to happen anytime soon, but AI is here to stay and has already established itself as a significant part of many people’s workday routines.
I’ve been as enamored of ChatGPT and its ilk as the biggest AI boosters. I use AI for entertainment and curiosity, but I don’t use it for work. That is to say that not one word of the text, code, or examples used in this book has been generated by AI. Everything you read here is, for good or ill, the product of my warpedfrom-birth brain.