HTML tags
- Title: The HTML caption is defined by
- Comment: <! comment content >
- Example:<!--This is a comment-
- Paragraph:<p></p> is generally a line, no matter how long the paragraph content
- Links: defined by <a></a>
- Example <a href= "http://www.baidu.com" >this is a link</a>
- Images: defined by
- Example: Adjustable image size
HTML elements
- HTML element to start tag starting
- HTML element terminated with end tag
- The content of an element is the content between the start tag and the end tag
- Some HTML elements have blank content (empty contents)
- Empty elements are closed in the start tag (ending with the end of the start tag)
- Most HTML elements can have properties
- The HTML element refers to all the code from the start tag (start tag) to the end tag (end tag).
- HTML tags are not case sensitive
HTML properties
HTML tags can have properties that provide information about more elements
The property always appears as a name/value pair, such as: Name= "value"
property is always specified in the start tag of the HTML element
Example:
<a href= "http://www.w3school.sinaapp.com" >this is a link</a>
<H1 align= "Center" > has additional information about alignment.
<body> defines the body of the HTML document.
<body bgcolor= "Yellow" > has additional information about the background color.
<table> define HTML tables. (You will learn more about HTML tables in a later section.)
<table border= "1" > has additional information about the table border.
HTML hint: Use lowercase attributes
Property and property values are not case sensitive.
However, the World Wide Web Consortium recommends lowercase attribute/attribute values in its HTML 4 recommendation standard.
XHTML requires the use of lowercase attribute/property values.
Always quote attribute values
Property values should always be included in quotation marks. Double quotes are the most common, but there is no problem with single quotes.
In some individual cases, such as the attribute value itself contains double quotes, you must use single quotes, for example:
Name= ' Bill ' HelloWorld ' Gates '
HTML Attribute Reference Manual
Our complete HTML reference manual provides a complete list of the legitimate attributes that each HTML element can use:
A complete HTML reference manual
The following lists the properties that apply to most HTML elements:
Properties |
value |
Description |
Class |
ClassName |
Class name of the specified element (classname) |
Id |
Id |
Unique ID of the specified element |
Style |
Style_definition |
Inline style for the specified element (line style) |
Title |
Text |
Additional information for the specified element (can be displayed in tooltips) |
For more information on standard properties, please visit:
HTML Standard Properties Reference manual
Getting Started with HTML 1