HTML Learning Notes
2009-09-07 14:34
323 查看
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>
…
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>
…
相关文章推荐
- HTML&CSS Learning Notes 6
- HTML&CSS Learning Notes 2
- HTML&CSS Learning Notes 2 (Additional)
- Learning Notes for HTML/CSS/JS
- HTML&CSS Learning Notes 4
- HTML&CSS Learning Notes 3
- HTML&CSS Learning Notes 5
- HTML learning notes
- HTML&CSS Learning Notes 1
- Data structures for game programming learning notes (二)——array
- Erlang Learning Notes
- 170715 Keras Learning Notes(TBC)
- DeepLearningNotes: Network In Network
- Physics-Based Animation learning notes
- 3.18:VOA Learning notes
- Notes on Transfer Learning
- notes/tips during sql tutorial learning
- [BBS] bbs Learning Notes --
- Deep Learning Notes 1
- Learning Perl 4ed Reading Notes - Chapter4 Subroutines