HTML Learning Notes

来源:互联网 发布:淘宝怎么刷流量 编辑:程序博客网 时间:2024/05/20 06:40

http://en.wikipedia.org/wiki/HTML:

several types of markup elements used in HTML.

Structure
    describes the purpose of the text
    <h2>Golf></h2>

Presentational
    describes the appearance of the text,regardless of its function
    <b>boldface</b>
Hypertext
    links parts of the document to other documents
    <a href="http://en.wikipedia.org/">Wikipedia</a>

Attributes
    Most of the attributes of an element are name-value pairs, separated by "=", and written within the start tag of an element, after the element's name.

common attributes
id
    provides a document-wide unique identifier for an element
class
    provides a way of classifiying similar elements
title
    used to attach subtextual explanation to an element

http://www.w3schools.com/htmL/:

HTML Tip:
Use Lowercase Tags
Always Quote Attribute Values
Use Lowercase Attributes

Complete HTML Reference:
http://www.w3schools.com/tags/default.asp

Paragraph:
there is a blank line before and after the paragraph
you can use <br> instead of <p> to avoid the blank line

<blockquote>
The browser inserts line breaks and margins for a blockquote element.

style attribute
The purpose of the style attribute is:

To provide a common way to style all HTML elements.

Styles was introduced with HTML 4, as the new and preferred way to style HTML elements. With HTML styles, styles can be added to HTML elements directly by using the style attribute, or indirectly by in separate style sheets (CSS files).

<body style="background-color:yellow">
<p style="font-family:courier new; color:red; font-size:20px">
<h1 style="text-align:center">

HTML Layout
    Using Tables

<table border="0" width="100%" cellpadding="7">
  <tr>
    <td width="50%" valign="top">

    </td>
    <td width="50%" valign="top" bgcolor="#00FFFF">

    </td>

  </tr>
</table>

原创粉丝点击