html + html and introduction of elements based tutorial css

Introduction to HTML

What is HTML?

HTML that is HTML (Hyper Text Markup Language), a language used to describe web pages.
HTML structure comprises a "head" portion (Western: Head), and a "body" portion (Western: Body), wherein "head" portion of web page providing information about the "body" section provides specific content page.
It is a set of a markup language tag label (Markup Tag)
the HTML page described using the markup tags

The following code:

<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>

Example explained:

<html> and the text between the </ html> page description
text between the <body> and </ body> is the visible page content of
the text between <h1> and </ h1> is displayed as the title
<p> and the text between </ p> is displayed as a paragraph

HTML element

HTML documents are defined by the HTML element.

Element refers to all HTML tags from the tag start (start tag) to the end tag (end tag) of.

Start tag Element content End tag
<p> This is a paragraph </p>
<a href="default.htm"> This is a link </a>
<br />    

Note: The start tag is often called an open-label (opening tag), the end tag is often called the closing tag (closing tag), most HTML elements can have attributes.

Empty HTML elements

HTML elements without content are called empty elements. In XHTML, XML, and future versions of HTML, all elements must be closed.

Adding a slash at the beginning of the label, such as: <br> empty element tag is not closed, and <br /> is the right way to close empty elements, HTML, XHTML and XML accept this way.

Even <br> it is valid in all browsers, but using <br /> actually more long-term protection.

HTML Tip: Use lowercase tags

HTML tags are not case sensitive: <P> is equivalent to <p>. Many sites use uppercase HTML tags.

W3School using lowercase tags because the World Wide Web Consortium (W3C) recommended the use of lowercase in HTML 4, the mandatory use of lower case and in future versions of HTML (X) in.

HTML attributes

HTML tags can have attributes. Attribute provides more information about HTML elements.

Attributes are always in the form of name / value, such as: name = "value".

Attributes are always specified in the start tag HTML element.

Create a front-end learning qun438905713, most in the group are zero-based learners, we help each other, answer each other, and also to prepare a lot of learning materials, welcomed the zero-based junior partner to the exchange.

Examples of attributes:

HTML links are defined by <a> label. The link address is specified in the href attribute:

<a href="http://www.ryxxff.com">This is a link</a>

Note: The attribute value should always be included in quotation marks. Double quotes are the most common, but there is no problem using single quotation marks. 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 Tip: Use lowercase property

Attributes and attribute values ​​are not case sensitive.

However, the World Wide Web Consortium recommended lowercase attributes / attribute values ​​in their HTML 4 recommendation standard.

The new version of (X) HTML requires the use of lowercase property.

Some common HTML attributes:

Attributes value description
class classname Prescribed class name element (classname)
id id The only element of id specified
style style_definition Prescribed elements inline style (inline style)
title text Additional information specified elements (can be displayed in the tooltip)

HTML Editor

Use Notepad or TextEdit to write HTML

You can use a professional HTML editor to edit the HTML:

Adobe Dreamweaver

Microsoft Expression Web

CoffeeCup HTML Editor

Published 10 original articles · won praise 0 · Views 5850

Guess you like

Origin blog.csdn.net/htkms87/article/details/104599267