html--Common Elements and attributes

Source: Internet
Author: User

HTML5 is a markup language made up of tags, this article introduces some of the HTML5 tags

Common tags reserved by HTML5

<!----> Defining HTML Annotations 

code example:

<! doctype html>

Text formatting tags

These elements allow the text to render a specific effect in the browser

<b> define bold text <i> define italic text <em> define accent text <strong> define bold text, which is essentially the same as the role and usage of <b> tags <sup> definition Superscript text <sub> define subscript text <bdo> define the direction in which the text is displayed, which specifies the Dir property, which can be either ltr or RTL

code example:

<! doctype html>

Semantic-related elements

HTML5 retains the following related elements <abbr> is used to denote an abbreviation <address> to represent an address <blockquote> to define a long reference text <q> used to define a short The reference text <cite> used to represent the title of the work <code> used to represent a piece of computer code <dfn> to define a professional term <del> define the deleted text in the document <in S> Defining Document Insertion Text <pre> pre-formatting tags <samp> defining sample text content <kbd> defining keyboard text <var> used to represent a variable

Hyperlinks and Anchor points

Hyperlink <a.../>, which can specify core properties such as the ID class style, can also specify various event properties such as OnClick, and can specify three important attributes as follows

HREF: Specifies another resource that the hyperlink is associated with

Target: Specifies which frame in the frameset is used to load another resource, the property value of which can be _self _blank _top _parent

<a href= "target=" _blank "" > Baidu </a><a href= "#test" > Navigate to test Anchor </a><a name= "test" ></a >

List related labels

<ul> Define unordered lists <ol> define an ordered list this element can specify the following three properties, start: Specify the starting number of the list item type: Which type is the number reversed this property is used to specify whether to reverse the sort (currently no browser supports this property) <li> Defining list Items <dl> defining lists <dt> defining header list Items <dd> defining plain list items

code example:

<! doctype html>

Image-Related tags:

 src: This property specifies where the picture is located alt: As a tooltip for changing a picture height: Height width: The width of the picture usemap= "#mapname" <map.../& Gt <map name= "" > <area= "" coords= "" href= "" > <area= "" coords= "" href= "" > </map>

Table-Related tags:

<table> defines table properties: cellpadding: Specifies the spacing between cell contents and cell borders cellspacing: Specifies the spacing between cells, which can be either a pixel value or a percentage widt H: Table width <caption> definition table title <tr> define table row <td> Define cell <th> Define table header cells <tbody> define the body of the table <thead > Define the header of a table <tfoot> define a table's feet rowspan colspan two properties for defining cross-row cross-columns

Framework related elements:

<iframe src= "" width = "height=" ">

HTML5 new Common Properties:

The Contenteditable property is set to True, then the browser will allow the developer to edit the contents of the HTML element directly, and can inherit, if the parent element of an HTML element is editable, then the child element can be edited by default DesignMode property Equivalent to a global contenteditable property, if the DesignMode property of the entire page is set to ON, all the supported Contenteditabe on the page become editable State hidden property Hiddle set to True, means that the browser does not display the component, and the browser does not retain the space occupied by the component, which is equivalent to setting the Display:none;spellcheck property setting in CSS spellcheck= "true" the browser will perform an input check on the input text content

HTML5 new Common elements: less application, slightly

HTML5 Header and Meta information

<script> This element is used to include JavaScript script links external js<script type= "Text/javascript" src= "" ><style> for defining internal CSS styles < Link> link External Resource link external css<link type= "Text/css" rel= "stylesheet" href= "" ><meta> define metadata for HTML pages <mata charset = "Utf-8" > <mata http-equiv= "Refreash" content= "2; Url= "Http://www.baidu.com" >

html--Common Elements and attributes

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.