一本给初学者的HTML+CSS 入门书籍
Preface
What is a Browser?
Who Should Read This Book
What You’ll Learn from This Book
How You’ll Learn to Build Your Website
HTML, Markup, CSS — Welcome to Your First Bits of Jargon!
Building the Example Site
What This Book Won’t Tell You
What’s in This Book
Where to Find Help
The SitePoint Forums
The Book’s Website
The SitePoint Newsletters
The SitePoint Podcast
Your Feedback
Acknowledgements
Conventions Used in This Book
Markup Samples
Tips, Notes, and Warnings
1. Setting Up Shop
The Basic Tools You Need
Windows Basic Tools
Mac OS X Basic Tools
Beyond the Basic Tools
Windows Tools
Mac OS X Tools
Not Just Text, Text, Text
Windows Tools
Mac OS X Tools
Online Tools
Creating a Spot for Your Website
Windows
Mac OS X
Summary
2. Your First Web Pages
Nice to Meet You, HTML
Anatomy of a Web Page
Viewing the Source
Basic Requirements of a Web Page
The Doctype
The html Element
The head Element
The title Element
meta Elements
Other head Elements
The body Element
The Most Basic Web Page in the World
Headings and Document Hierarchy
Paragraphs
For People Who Love Lists
Commenting Your HTML
Symbols
Diving into Our Website
The Home Page: the Starting Point for All Websites
Splitting Up the Page
Linking Between Our New Pages
The blockquote (Who said that?)
The cite Element
strong and em
Taking a Break
Summary
3. Adding Some Style
What is CSS?
Inline Styles
Adding Inline Styles
The span Element
Embedded Styles
Jargon Break
Why Embedded Styles Are Better Than Inline Styles
External stylesheets
Why External Stylesheets Are Better Than Embedded Styles
Creating an External CSS File
Linking CSS to a Web Page
Starting to Build Our Stylesheet
Stylish Headings
A Mixture of New Styles
A New Look in a Flash!
A Beginner’s Palette of Styling Options
Recap: the Style Story so Far
Looking at Elements in Context
Contextual Selectors
Grouping Styles
Which Rule Wins?
Recapping Our Progress
Styling Links
Class Selectors
Styling Partial Text Using span
Summary
4. Shaping Up Using CSS
Block-level Elements versus Inline Elements
Block-level Elements
Inline Elements
Inline Begets Inline
Inline Elements Can Never Contain Block-level Elements
Styling Inline and Block-level Elements
Sizing Up the Blocks
Setting a Width
Setting a Height
Adding Borders to Block-level Elements
Example Borders
Styling Individual Sides of an Element
Shorthand Border Styles
Border Styles You Can Use
Shaping and Sizing Our Diving Site
Adding Padding
Introducing Padding to the Project Site
Margins
The Box Model
Positioning Elements Anywhere You Like!
Showing the Structure
Absolute Positioning
Other Layout Options
More Absolute Positioning
Relative Positioning
Floated Positioning
Styling Lists
Summary
5. Picture This! Using Images on Your Website
Inline Images
Anatomy of the Image Element
Web Accessibility
JPEG versus GIF versus PNG
Transparency
PNG: King of Transparency
Adding an Image Gallery to the Site
Updating the Navigation
Adding the New Gallery Page
Adding the First Image
Formatting the Picture Using CSS
Captioning the Picture
Basic Image Editing
Image Cropping
Special Effects
Resizing Large Images
Other Software
Filling up the Gallery
Sourcing Images for Your Website
Background Images in CSS
Repeated Patterns
Nonrepeating Images
Shorthand Backgrounds
Fixed Heights and Widths
Setting a Background for Our Navigation
Summary
6. Tables: Tools for Organizing Data
What is a Table?
Anatomy of a Table
Styling the Table
Borders, Spacing, and Alignment
Making Your Tables Accessible
Linearization
summary
Captioning Your Table
Adding an Events Table
Stylish Table Cells
Advanced Tables
Merging Table Cells
Advanced Accessibility
Summary
7. Forms: Interacting with Your Audience
Anatomy of a Form
A Simple Form
The Building Blocks of a Form
The form Element
The fieldset and legend Elements
The label Element
The input Element
The select Element
The textarea Element
Submit Buttons
The Default Control Appearance
Building a Contact Page
Editing the Contact Us Page
Adding a form and a fieldset Element
Styling fieldset and legend with CSS
Adding Text Input Controls
Tidying Up label Elements with CSS
Adding a select Element
Adding a textarea Element
Adding Radio Buttons and Checkboxes
Completing the Form: a Submit Button
Processing the Form
Signing Up for Form Processing
Inserting the Form Code
Feedback By Email
Summary
8. Interacting with Social Media
But Facebook is the Internet, right?
Go Where the Audience Is
A Two-pronged Attack: Facebook and Twitter
Setting Up a Facebook Page
Adding a Like Box to Your Site
Let’s Sprinkle on Some Twitter Glitter
Adding Your Twitter Updates to the Site
Getting a Follow Button
Updating from a Twitter Client on Your Smartphone
But the Page Looks Really Messy Now!
Get Twitter to Update Facebook to Update Your Site
Now the Training Wheels Are Off …
Get Smart!
Summary
9. Launching Your Website
The Client—Server Model
Web Hosting Jargon
Hosting Your Website—Finding Server Space
Free Hosting—with a Catch!
Free Hosting—with a Domain Name at Cost
What is Web Forwarding?
The Downsides of Web Forwarding
Paying for Web Hosting
Hosting Essentials
FTP Access to Your Server
Adequate Storage Space
A Reasonable Bandwidth Allowance
Hosting Nice-to-haves
Email Accounts
Server Side Includes (SSIs)
Support for Scripting Languages and Databases
Pre-flight Check: How Do Your Pages Look in Different Browsers?
Uploading Files to Your Server
FTP Settings
Uploading with FileZilla for Windows
Uploading with Cyberduck—Mac OS X
Other Uploading Tools
Where’s Your Site At?
Checking Links
Validating Your Web Pages
Promoting Your Website
Submit Your Website to Search Engines
Tell Your Friends and Colleagues
Craft an Email Signature with Your Website Details
Post on a Related Forum
Link Exchange
Summary
10. Enhancing the Site with HTML5 and CSS3
HTML5: A Brief History
CSS3 —CSS2 —what’s the difference?
CSS3: Not Yet Universally Supported
The Good News on CSS3
Look at All Those Sharp, Pointy Corners!
The Details in the Shadows
From box-shadow to text-shadow
We Don’t Serve Your Type Around Here!
Other CSS3 Features to be Aware of
IE as a Second-class Citizen
Summary
11. Adding Interactivity with jQuery
JavaScript? jQuery? What’s the difference?
Standard JavaScript versus jQuery: A Simple Example
How do I get jQuery and use it?
Hang On a Moment!
jQuery: Primed and Ready For Action
Using jQuery on the Project Site
Setting Up References to jQuery
Adding Default Form Value
Showing the Picture Gallery’s Captions on Hover
Summary
12. What to Do When Things Go Wrong
Prevention
Keep Multiple Browsers Open While Developing
Validate HTML and CSS as You Go
Learn About Known Browser CSS Bugs
Prepare Your Browser for Battle—with Extensions!
Inspecting Problems with Firebug
Web Developer Toolbar
Disable CSS
Disable JavaScript
Outline Elements on the Page
Hide Images or Reveal alt Attributes
View Information about CSS and JavaScript
And So Much More …
How to use XRAY
Summary
13. Pimp My Site: Cool Stuff You Can Add for Free
Getting the Low-down on Your Visitors
Choosing a Statistics Service
Registering a Google Account
Adding the Statistics Code to Your Web Pages
A Search Tool for Your Site
Searching by Genre
Enhancing Search Further with jQuery
Discussion Forums
Summary
14. Where to Now? What You Could Learn Next
Improving Your HTML
The Official Documentation
Other Useful HTML Resources
Advancing Your CSS Knowledge
The Official Documentation
The Ultimate CSS Reference
HTML Dog
CSS3.info
CSS Discussion Lists
The CSS Discuss List’s Companion Site
Learning JavaScript
Becoming a jQuery Guru
Improving Website Performance
Learning Server-side Programming
Scripting Languages in Brief
Learning PHP
Summary
Index
《高信用社会:信托与信用制度》内容简介:“人无信不立,事无信不成,商无信不兴”。信用是社会运行的基石和商业成功的秘诀,而信托
《SQL权威指南(第4版)》为SQL名著中文版,兼顾技术与实践,全面细致介绍高级技术,致力于打造SQL编程专家。《SQL权威指南(第4版)
《田小七来啦4:家庭里的小科学》内容简介:妈妈蔡小芹买了一筐鸡蛋,里面有好蛋也有坏蛋,田小七说他会魔法,一下子就能看出哪个是
古埃及的莲花式柱头,中世纪的火焰式彩窗,玛丽―安托瓦内特的金色书房,拿破仑皇后的穿衣镜……几千年来审美潮流的变迁,正是通
《PVCBOT零基础机器人制作(第3版)》内容简介:“PVCBOT”是“PVC-Robot”的缩写,既是指以PVC为主要材料来制作的机器人,也是指定
《春秋:五霸迭兴》内容简介:本书在尊重史实的基础上,以诙谐、通俗的语言,描述了春秋近三百年间的历史演变。五霸的起落兴衰,诸
《移动互联网时代的新媒体概论》内容简介:经过多年的发展,基于互联网的新媒体从形式到内容,从功能到技术都发生了深刻的变化。在
《现代示波器高级应用》内容简介:本书深入剖析了现代示波器的架构,并通过近百个经典案例及精美插图,展示了现代示波器在实战中的
《狼书(卷3):Node.js高级技术》内容简介:Node.js开发简单,性能极好,一经发布便成了明星级项目。随着大前端领域的蓬勃发展,跨
互联网在日常工作和生活中扮演日益重要的角色,互联网将如何重塑社会?本书通过汇集有关互联网文化、经济、政治角色等问题的研究
每一个渴望学习C++语言的初学者都希望能够有一本全面的,实用的,同时又是生动有趣的入门书。这本入门书可以告诉这些初学者,整个
《刻小说的人》内容简介:本书是作家比目鱼书评和文学随笔的结集,涉及五十余位中外作家的作品。文章中既有对作家写作技艺的精妙分
自万维网络中出现商业站点以来,基于Web的商业需求和用户的隐私权利之间就存在着不断的斗争。Web开发者们需要收集有关用户的信息
《C++程序设计(第2版)》内容简介:本书是为已有C语言程序设计基础、想进一步学习C++面向对象程序设计的读者编写的。书中用通俗易
VB-MAPP语言行为里程碑评估及安置程序-(全2册) 本书特色 这套《语言行为里程碑及安置程序》为教育人员和家长对孤独症和其他发展性障碍孩子的学习、语言和社会...
《通信原理》以有线通信和无线通信为背景,主要介绍通信系统、通信设备的基本概念、原理和技术。《通信原理》的章节体系与实际通
赵涏元chogar@naver.com目前在KB投资证券公司负责安全工作,管理安全防范项目(www.boanproject.com)。在A3security公司...
《第N+1个》内容简介:12名受害人,凶手作案手法相同,犯罪现场相似,绵延一年,警方却毫无头绪。一部名为《第N 1个》的小说在风口
《Rust权威指南》内容简介:本书由Rust核心开发团队编写而成,由浅入深地探讨了Rust语言的方方面面。从学习函数、选择数据结构及绑
《绘画高手这样画·素描静物》内容简介:书中分为3个部分,第1章节为基础知识章节;第二章节为物体质感的绘制章节;第三章节绘画高