TAILIEUCHUNG - HTML cơ bản - p 8

54 Chapter 2: The HTML Language or height that is a percentage of what is available to the element. Example shows a floated table with a width attribute. The tr element defines a table row, and the th and td elements define table cells. Tables are discussed in more detail later in this chapter. Example : An HTML table with width and float attributes Example body { padding: 30px; line-height: ; } td { text-align: right; padding: 5px; } th { text-align: left; padding: 5px; } Final Exam Results PointsGrade Larry86B+ Heidi91A The. | 54 Chapter 2 The HTML Language or height that is a percentage of what is available to the element. Example shows a floated table with a width attribute. The tr element defines a table row and the th and td elements define table cells. Tables are discussed in more detail later in this chapter. Example An HTML table with width and float attributes DOCTYPE html html head title Example title style type text css body padding 30px line-height td text-align right padding 5px th text-align left padding 5px style head body h2 align center Final Exam Results h2 table width 33 align right hspace 12 border 1 tr th th th Points th th Grade th tr tr th Larry th td 86 td td B td tr tr th Heidi th td 91 td td A td tr table p The final exam required students to create an HTML page containing a floating table. Larry lost a number of points because he used em align em and em hspace em attributes in the table statement instead of using the CSS em float em and em padding em properties in his entry entitled cite Example cite . p body html Note the use of the cite element to mark up a title. Figure shows how this HTML appears in a browser. From the Library of Wow eBook HTML Attributes 55 Figure HTML page with a floating table element EVENT HANDLERS Another class of HTML global attributes is used to specify what actions browsers should take when the user interacts with an element. These event handlers take as their values one or more JavaScript statements. Typically the value consists of a call to a JavaScript function defined in the document s head or in an external file and this function does all the work. For example if you had an input form on a web page that requested the user s email address you might add the onchange attribute to call a function that checks that the input represents a valid email address. The HTML element would look like this input type text onchange check_emai l _address thi s .value In the late twentieth century web developers built

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.