TAILIEUCHUNG - CSS Web Design For Dummies- P2

Tham khảo tài liệu 'css web design for dummies- p2', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 32 Part I The ABCs of CSS__ A style sheet is often written and saved as a .css file on the hard drive. Thereafter any HTML .htm Web page document that wants to use the styles defined in the .css file merely references it as a link. You see how to link HTML to a CSS file in a minute. Run Notepad if you use XP choose Start t All Programs t Accessories t Notepad . Then type this in to define an ultra-simple style that tells a Web site how you want paragraphs of text displayed P color blue text-align right font-family courier Save this style sheet by choosing File t Save As in Notepad and then naming the file . You can use any name you want but you need to reference that name in your Web page s HTML code. To do so delete everything in Notepad and type in this HTML page that references your style sheet file html head link type text css rel stylesheet href head body H1 Headline Text H1 p This is body text p body html Use Notepad s File1 tSave As feature to save this code to a file named in the same directory where you saved the file. This highly simplified Web page code illustrates how an external style sheet file works. In the .css file you specified that the p paragraph element should be blue right-aligned and in the Courier typeface. In your HTML code you linked to a style sheet named . This style sheet is located in the same directory as the .htm file. You have not defined a style for the H1 headline style so it defaults to the browser s standard size color position font and perhaps other qualities for the H1 style. With the Internet Explorer defaults the headline is left-aligned black and a serif font. team Line - live informative Non-cost and Genuine __Chapter 2 Getting Results with CSS 33 But you did specify a style for the paragraph tag. So to see this style in action double-click on .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.