Html BASICS (1): html Basics

Source: Internet
Author: User

Html BASICS (1): html Basics

Html5 Document declaration: <! Doctype html>

<Head>

You can insert script, Style File css, and various meta information into the head element.

The tag elements that can be added to the header area include <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>.

<Title>

Define the title in the browser toolbar

Provide the title when the page is added to favorites

Page title displayed in search engine results

<Meta>

Defines page encoding, UTF-8 multi-language encoding, and gb2312 Simplified Chinese Encoding

<meta charset="utf-8"/>

Define document keywords for search engines

<Meta name = "keywords" content = "keyword 1, keyword 2...">

Define web page description

<Meta name = "description" content = "content description">

Define page author

<meta name="author" content="zhuang">

Refresh the page every 30 seconds

<meta http-equiv="refresh" content="30">

<Link>

Defines the relationship between documents and external resources. The common purpose is to link a style sheet.

<link rel="stylesheet" type="text/css" href="zhuang.css">

<P>

<P> This is a paragraph </p>

<Br/>

Line Break <br/>

<H1>-

<H1> This is Title 1 

Entity character

Space: & nbsp; minor signs: & lt; major signs: & gt; double quotation marks: & quto; single quotation marks: & apos; & Symbol: & amp; Copyright: & copy; Registered Trademark: & reg;

Text Formatting

<B> define bold Chinese characters <em> define important words <I> define italics <big> define large words <small> define small words <strong> define weighting tone <sub> define subscripts <sup> define the upper mark <ins> define the insert word <del> define the delete word

<A> Link

<A href = "url" title = "" target = ""> This is a link </a>

Title prompt information

Target open method:

_ Blank open the linked document in a new window

_ Self open the linked document in the same framework

_ Parent open the linked document in the parent framework set

_ Top open the linked document throughout the window

<A href = "mailto: Email Address"> email link </a> <a href = "tel: phone number "> one-click call </a> <a href =" sms: Phone Number "> one-click message sending </a>

./Current Directory

../Return to the previous directory

Images/enter a directory

../Images/return to the previous directory and enter the images directory.

Anchor

It is often used for directory, page content positioning, back to the top

<A href = "# anchor name"> </a> <a name = "anchor name"> </a>

Using the id attribute instead of the name attribute to name the anchor is also valid

Image


Information displayed when the alt image fails to be loaded

Title move the cursor over the image

Width and height define the width and height of the image. If only one of them is defined, the other will be adjusted proportionally.

Image hot zone

<map name="zhuang">    <area shape=" " coords=" " href="url"/></map>

Shape hot area shape, rect (rectangle), circle (circle), poly (polygon)

Coords coordinate values:

X1, y1, x2, y2: if the shape property value is rect, the value specifies the coordinates in the upper left corner and lower right corner of the rectangle.

X, y, radius: if the shape property value is circle, the value specifies the coordinates and radius of the center.

X1, y1, x2, y2,..., xn, yn: if the shape property value is poly, This value specifies the coordinates of each side of the polygon.

<Ul> unordered list

<ul type=" ">    <li>1</li>    <li>2</li>    <li>3</li></ul>

Type: disc (solid circle), circle (hollow circle), square (solid square)

Type = "none", go to the previous list symbol

<Ol> ordered list

<ol type=" " start=" " reversed>    <li>1</li>    <li>2</li>    <li>3</li></ol>

Types include 1 (Arabic numerals), a (lowercase letters), A (upper-case letters), I (lower-case Rome letters), And I (upper-case Rome letters)

Start = "5", define the list sequence number from 5th

Reversed. The list sequence number is defined as descending order.

<Dl> Custom list

<dl><dt>Coffee</dt><dd>- black hot drink</dd><dt>Milk</dt><dd>- white cold drink</dd></dl>

<Table> table

<Table> define a table

<Th> define the table Header

<Tr> Define table rows

<Td> Define table units

Width defines the table width px, %

Height defines the height of the table px, %

Border defines the border width of a table.

Cellpadding defines the spacing between the border and content

Cellspacing defines the spacing between cells.

Align defines the alignment options left, right, and center.

Valign defines vertical top, middle, bottom

Colspan defines merging column cells

Rowspan defines merging row Cells

<table width="300px" height="90px" border="0" cellpadding="0" cellspacing="1" bgcolor="black">    <tr height="33.3%">        <td width="33.3%" rowspan="2" bgcolor="green"></td>        <td width="33.3%" colspan="2" bgcolor="blue"></td>    </tr>    <tr heigh="33.3%">        <td width="33.3%" bgcolor="red"></td>        <td width="33.3%" rowspan="2" bgcolor="yellow"></td>    </tr>    <tr heigh="33.3%">        <td width="33.3%" colspan="2" bgcolor="purple"></td>    </tr></table>

Border = "0", cellspacing = "1" can be used to set the thin border of a table.

<Iframe> embedded framework

Width defines the frame width px, %

Height defines the frame height px, %

Frameborder defines whether to display the border

Scrolling defines whether to display the scroll bar yes, no, auto

Iframe can be used as the target of the link. The target attribute of the link must reference the name attribute of iframe.

<Iframe src = "http://www.cnblogs.com" name = "zhuang"> </iframe> <a href = "http://www.baidu.com" target = "zhuang"> Baidu </a>

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.