HTML little knowledge


HTML
Hyper Text Markup Language
(hypertext tag)

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


<> Tag containing the tag attribute

 

 


<! - -> Define Notes
Hint: - is HTML comment tags, use <and> HTML tag is in line with the rules of grammar <-!>.
/ * * / Is a CSS comment tags.
/ * * / (Comment block) // (single line comment) is JS comment tag.
There are two types of comments their use environment, and can not replace each other.

 

 


<! doctype> Custom document type
Tip: <! doctype> declaration has no closing tag.
<! doctype> declaration is not case sensitive.
<! doctype> declaration must be the first line of HTML documents located in <html> tag before.

 

 


<html> custom HTML document
attributes: Value: Description:
the manifest url definition of a URL, the URL is described in the document cache information.
defined XML namespace attribute xmlns http://www.w3.org/1999/xhtml

 

 


The title <title> define document
attributes: Value: Description:
the dir direction RTL LTR predetermined text content element.
language code element content lang language_code provisions.
xml: lang language_code specified language code XHTML document element content.

 

 


body <body> define document
attributes: Value: Description:
the alink RGB (X, X, X) in the active document #XXXXXX colorName predetermined link (active link) of the color.
background URL specified background image of the document.
bgcolor rgb (x, x, x ) #xxxxxx colorname specified background color of the document.
link rgb (x, x, x ) #xxxxxx colorname provisions of the document default color for unvisited links.
text rgb (x, x, x ) #xxxxxx colorname color of all the provisions of the document text.
vlink rgb (x, x, x ) #xxxxxx colorname provisions of the document has been visited link color.

 

 

<h1> to <h6> defines HTML title
attribute: Value: Description:
align = left right left Center The justify (Justify) provides the title Chinese this arrangement.

 

 


<p> Paragraph defined
attributes: Value: Description:
align = left right left Center The justify (Justify) provides the title Chinese this arrangement.

 

 


<br> define a simple fold line (Line)
Note:
Use <br> to enter an empty line instead of the paragraph segmentation.
<br> tag is an empty tag (meaning it has no closing tag, so it is wrong: <br> </ br>).
The end of the beginning label on the label, that is <br />.

 

 


<hr> define horizontal
attributes: Value: Description:
align = left right left Center hr predetermined alignment elements.
noshade noshade hr element specified color rendering is a solid color.
size pixels (px) hr predetermined element height (thickness).
width or width pixels (px)% hr predetermined elements.

 

 


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 


<acronym> Acronym defined
Example:
Code: <acronym title = "World Wide Web"> WWW </ acronym>
Display results: WWW

 

 


<abbr> Abbreviations defined
Example:
Code: The <abbr title = "People 's Republic of China"> PRC </ abbr> was founded in 1949.
Display results: The PRC was founded in 1949.

 

 


Contact Information <address> Defines the document author or owner.

<B> bold text defined

<Big> define large text.

<I> italic text defined

<Em> definition emphasizes the text, the actual results and italic text almost

<Strong> defined bold text, and the action <b> is substantially the same

<Small> small text defined

<Sub> subscript text definition

<Sup> defined superscript text

<Bdo> defined text display direction, there dir property, only extract LTR (left to right) or RTL (right to left)

<Tt> exhibit similar width or typewriter text effects.

-------------------------------------------------- -------------------------------------------------- -------------------------------------------------- --------------------------
<a href="链接地址"target="目标窗口"> link text or picture </a>

href specify another resource associated with hyperlinks


That specify the frame target frame set to load another resource, the property can be

_self (using its own)
_blank (new window)
_top (top frame)
_parent (father Framework)

<Img src = "Image Address" alt = "prompt text">

<Span> class content of text lines and the like </ span> Modified

-------------------------------------------------------------------------------------------------------

Space & nbsp;

Greater than (>) & gt;

Less than (<) & lt;

Quotation mark ( ") & quot;

No copyright & copy (?);

-------------------------------------------------------------------------------------------------------

<frameset cols = "25%, 50%, *" rows = "50%, *" border = "5"> cols ( vertical) rows (lateral) do not exist
<FRAM the src = "the top.html">
. .....
</ frameset>

Note that <frameset> </ frameset> tag can not be <body> </ body> tags simultaneously. Unless you use the <noframes> tag in the <frameset> in


cols pixels% * define frame number and size of columns in

rows pixels% * define the number and size of rows in the frame

 


<html>
<frameset rows="25%,50%,25%">
<frame src="/example/html/frame_a.html">
<frame src="/example/html/frame_b.html">
<frame src="/example/html/frame_c.html">
</frameset>
</html>


------------------------------------------------------------------------------------


frameborder 0,1 Specifies whether to display a border around the frame

name frame_name specify the name of the iframe

scrolling yes, no, auto specifies whether scroll bars appear in an iframe

URL of the document is displayed in an iframe src URL specified

 

------------------------------------------------------------------------------------


<Table> is used to define a table </ table> End

<Tr> definition of the table rows that contain only an element <td> or <th> two elements

The number of rows to specify how many columns colspan- cell cross, rowspan- specified cell can span of: <td> defined cell contains two major properties

<Caption> is used to define a table caption

<th> Defines a table header cell

body <tbody> Defines a table

<Thead> Defines a table head

<Tfoot> Defines a table leg

cellspcing

cellpadding

 

------------------------------------------------------------------------------------


1. Form tags are generally under what circumstances to use?

The main rules for displaying data of
a suitable form may be used in the page


2. Use table tags for layout shortcomings

Code than larger, slower page views
hierarchy is more complex and difficult to maintain and revised
find data is not conducive to search engine


3. Stresses: To the page layout, it is recommended to use DIV + CSS, prohibited the use of tables for layout pages


------------------------------------------------------------------------------------


The syntax of the form tag

<form action = "Form Submit Address" method = "Submit method">
... text boxes, buttons and other single element ..
</ form>

Typical application form:

Baidu ...

personal registration; business registration ...


Common attributes form tag

action: After specifying the form submission is processed by the handler on the server

enctype: for encoding data in the specified form

application / x-www-form- urlencoded: default encoding, the values in the form of an empty element to process URL encoding

mutipart / form-data: binary manner on form.

text / plain: RUL form in use: when the only action attribute value of the form mailto.

method: Specifies the submission to the server usually get and post both ways


Mode request will get request parameter names and values ​​converted to a string, the URL and appended to the original, so the request parameter names and values ​​can be seen in the address bar. Beg get cut relatively small amount of data transmitted, generally not greater than 2KB.


amount of data requested to be transmitted is large post way, that generally may not be limited, often it depends on the server limit.
post request parameters are placed in the way of transmission of the HEADER HTML, the user can not see the request parameters in the address bar, security is relatively high

------------------------------------------------------------------------------------


Common form elements

The input element


Single text box: Specify <input ../> element type text
password input box: Specify <input ../> element type password

type hidden specify <input ../> element: hidden fields

type radio specify <input ../> element: checkbox

type checkbox to specify <input ../> element: box

The image frame: Specify <input ../> type image element (when type = "image" may specify the width and height attributes)

File upload field: Specifies the <input ../> type attribute of the element for the file to

submit, reset, type attribute specifies the push button <input ../> element to submit, reset, or button to

------------------------------------------------------------------------------------


setting checked radio button, check box is checked whether an initial state, can be specified only when the type attribute is checkbox or radio

disaled setting is disabled when this element is first loaded. When the type = "hidden" attribute is not specified that

The maxlength attribute is a number, the maximum number of allowed characters entered in the textbox.


readonly Specifies that the text box value can not be modified (you can use javascript to modify

This property is a number size specifying the length of the element. When the type = "hidden" attribute is not specified that

RUL src designated image displayed image field, only when type = "image" may specify the attribute.

 


value (defined) = name

 


<button type = "button type">
plain text, formatted text, images
</ button>

 

button labels common attributes

disable Specifies whether to disable this element. This attribute can be omitted or disable

name specifies the unique name of the button

type specifies that the button is the kind of button, can only be a button, rest, submit

 

 

 

背景图片 <body background="1 (1).jpg" marginwidth="520" marginheight="520">


Background color <span style = "background:">

 

<label><label>

 

<select name = "specify a list of names" size = "rows">
<the Option value = "option value" the Selected = "the Selected"> ... </ the Option>
</ the SELECT>

 


disabled Specifies whether to disable this element. This attribute can be omitted or disabled

mutiple set this list allows multiple selections

How many items within the list display size specified within the list

 

 

In the <select ... /> element, the element can contain the following two seeds

<option>: Options for defining a list box or menu item, it is common properties as follows:

disabled: Specify this option is disabled, the attribute value can only be disabled or omitted
selectd: Specifies whether the list is selected in an initial state, the value of only the Selected
value: specify parameter values corresponding to this option

<Optgroup>: used to define the list item or menu item group, with his common properties as follows:

label: Specifies the label for the option group. This property is required
disabled: Disable this option the group of all the options, the property value is really disabled or omitted

 

Multi-line text box grammar

<textarea name = "..." cols = " column width" rows = "line width">
text
</ textarea>

Common attributes multiline text

cols: Specifies the width of the text box, the property required
rows: Specifies the height of the text box, the property required
readonly: Specifies the text box read-only. This attribute can be omitted or readonly

-----------------------------------------------------------------------------------

 

Multimedia on Web_ refers to the sound effects, music, video and animation, modern network
network browser already supports many multimedia formats.

Common video formats

AVI
.avi
AVI (Audio Video Interleave) format was developed by Microsoft. All computers running Windows supports
AVI format. It is very common format on the Internet, but not windows computer is not always able to play.
WMV
.wmv
Windows Media format was developed by Microsoft. Windows Media is very common on the Internet, but if you do not install the
extra (free) component, you can not play Windows Media movies. Some later Windows Media movies
can not be played on all non-Windows computers because no suitable player.
The MPEG
a .mpg
the MPEG (Moving Pictures Expert Group) format on the Internet is the most popular format. It is cross-platform, get
.mpeg
the support of all the most popular browsers.
QuickTime
.mov
QuickTime format is developed by Apple. QuickTime is a common format on the Internet, but QuickTime electricity
movie can not be played on a Windows computer is not installed extra (free) component.
RealVideo
.rm
RealVideo format was developed by Real Media for Internet development. This format allows (online video, low bandwidth network
ram
network TV) video streams. Because of the low bandwidth priority, quality was often reduced.
Flash
SWF
Flash (Shockwave) format was developed by Macromedia. Shockwave format requires additional components to broadcast
.fv
release. However, the assembly will be preloaded into the IE or the like Firefox Browser.
4-Mpeg
MP4
Mpeg-4 (with H.264 Video compression) is a new format for the Internet. In fact, YouTube
is recommended to use MP4. YouTube receives a variety of formats, and convert all .fv or .mp4 for distribution. More and more
video publishers to MP4, as its Flash player and HTMLS due to hold network share format.

 

-----------------------------------------------------------------------------------


Multimedia on Web_ refers to the sound effects, music, video and animation, modern network
network browser already supports many multimedia formats.

MIDI
.mid
MIDI (Musical Instrument Digital Interface) is a device for electronic music (such as synthesizers and acoustic
.midi
format card). MIDI files do not contain sound, but digital music contains instructions can be played electronic products (such as a sound card).
Click here to refer to put The Beatles.
Because MIDI format only contains instructions, it is extremely compact MIDI file. The above example is only 23k in size, but it can broadcast
put nearly five minutes. MIDI is supported by Tali software on a wide range of platforms. Most popular web browsers support
MIDI.
RealAudio
.rm
RealAudio format was developed by Real Media for Internet development. The format also supports video. This format allows low-bandwidth tea
.ram
audio stream (online music, online music) in pieces. Because of the low bandwidth priority, quality was often reduced.
Wave
.wav
Wave (Waveform) format was developed by IBM and Microsoft developed. All computers running Windows and all network Liu
browsers (except Google Chrome) supports it.
WMA
.wma
WMA format (Windows Media Audio), where quality is superior to MP3, compatible with most players, except iPod. WMA
files can be transmitted as a continuous stream of data, which makes it very practical for Internet radio stations or online music.
MP3
.mp3
MP3 files are actually MPEG audio portion of the file. MPEG format originally developed by the Motion Pictures Expert Group. MP3
.mpga
is one of the most popular sound formats for music. We look forward to future software systems support it.

 

-----------------------------------------------------------------------------------

 

 

 

<Embed> Play Audio

<the embed the src = "troublelsaFriend.mp3" width = "200 is" height = "200 is" autostart = "to true"
Loop (loop) = "true"> (autoplay)
</ the embed>


<embed src = "running cat .swf" width = "200" width = 200 loop = "true" quality ( broadcast quality) = "High"
PLUGINSPAGE (automatically download and install the player) = "http: //www.macromedia .com / shouckwave / download / index.cgi? P1_Prod_Version = Shockwav
eFlash "> </ embed>


-----------------------------------------------------------------------------------

 

<object> tag
action: You can use the <object> tag to load the plug-in to the browser, to play audio and video by loading plugins
(for ie browser)

 

 

Using the <object> tag play audio
<Data Object = "TroublelsaFriend.mp3">
<param name = "the src" value = "TroublelsaFriend.mp3"> <param name = "AutoPlay (Auto Play)" value = "true"> < / object>

 


Using the <object> tag displays the Flash
<Object ClassID = "CLSID: D27CDB6E-AE6D-11cf- 96B8-444553540000" width = "300" height = "300"
the codebase (automatically downloaded Player) = "http: //active.macromedia .com / Flash4 / Cabs / swflash. CAB # Version = 4,0,0,0 ">
<param name =" movie "value =" takeoff flying animation. swf "> <param name = " play "value =" to true "> <param name =" Loop "value =" to true "> <param name =" Quality "value =" High ">
</ Object>


-------------------------------------------------- ---------------------------------
in order to achieve a better browser compatibility, general use of the embedded object tag sets embed tag


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase=http://download.macromedia.com/ pub/ shockwave/ cabs/ flash/swflash.cab#version=6,0,40,0 width="550" height="400" id="myMovieName"><param name=movie value="奔跑的猫swf"><param name=quality value=high>
<param name=bgcolor value=#FFFFFF>
<embed src="奔 跑的猫swf" quality=high bgcolor= #FFFFF width="550"hight="400"name="myMovieName" type="application/ x-shockwave-flash"PLUGINSPAGE="http://www.macromedia.com/ go/ getflashplayer">
</embed>
</object>

Guess you like

Origin www.cnblogs.com/mgl321768422/p/11453894.html