Table 1。1: HTML Tags and Description
HTML Elements
The HTML element is everything from the start tag to the end tag, where the element name is preceded by a forward slash as shown below with few tags:
Start Tag Content End Tag
<p> This is paragraph content。 </p>
<h1> This is heading content。 </h1>
<p> This is pision content。 </p>
<br />
Table 1。2: HTML Elements
Here <p>。。。。</p> is an HTML element, <h1>。。。</h1> is another HTML element。 There are some HTML elements which don't need to be closed, such as <img。。。/>, <hr /> and <br /> elements。 These are known as void elements。
HTML documents consist of a tree of these elements and they specify how HTML documents should be built, and what kind of content should be placed in what part of an HTML document。
HTML Attributes
An attribute is used to define the characteristics of an HTML element and is placed inside the element's opening tag。 All attributes are made up of two parts: a name and a value (name="value")
All HTML elements can have attributes来`自+优-尔^论:文,网www.youerw.com +QQ752018766-
Attributes provide additional information about an element
Attributes are always specified in the start tag
Attributes usually come in name/value pairs like: name="value"
The name is the property you want to set。 The value is what you want the value of the property to be set and always put within quotations。
There are four core attributes that can be used on the majority of HTML elements (although not all) are: Id, Title, Class and Style。
1。2CSS (Cascading Style Sheets)
1。2CSS Overview
Cascading Style Sheets (CSS), is a simple design language intended to simplify the process of making web pages presentable。
CSS handles the look and feel part of a web page。 Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used, as well as a variety of other effects。
CSS is easy to learn and understand but it provides a powerful control over the presentation of an HTML document。 Most commonly, CSS is combined with the markup languages HTML。
CSS is created and maintained by a group of people within the World Wide Web Consortium (or W3C) called the CSS Working Group。 The CSS Working Group creates documents called specifications。 When a specification has been discussed and officially ratified by the W3C members, it becomes a recommendation。[3]
CSS Syntax
A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding elements in your document。 A style rule is made of three parts:
Selector: A selector is an HTML tag to which a style will be applied。 This could be any tag like <h1> or <table> etc。
Property: A property is a type of attribute of HTML tag。 Put simply, all the HTML attributes are converted into CSS properties。 They could be color, border, etc。
Value: Values are assigned to properties。 For example, a color property can have the value either red or #F1F1F1 etc。
CSS Style Rule Syntax is shown as follows:
selector { property: value }
CSS Selectors
In CCS, there are two commonly used selectors: Class selector and ID selector。