HTML - property

Foreword

HTML attributes HTML element is the additional information prompts. 


HTML attributes

HTML elements can set properties

Element attributes may then add additional information

Properties generally described in the start tag

Property always appear as name / value pairs in the form of, for example: name = "value"


Examples of property

HTML hyperlinks defined by <a> label. Hyperlink address is specified in the href attribute:

< A the href = "http://www.baidu.com" > This is a hyperlink </ A >

 


HTML attributes common reference attribute value

Attribute values ​​should always be enclosed in quotation marks.

Double quotes are the most common, but the use of single quotation marks is not a problem.

Note: In some special cases, such as the attribute itself contains double quotes, then we must use single quotes, for example: name = 'Jessie J "sister stone"'.


HTML common attributes

class: defining one or more class name (className) for the html element (class name is introduced from the pattern file)

Unique id defined elements: id

style: the elements specified in the line style (inline style)

title: Description extra information element (as a toolbar) 

  Author: Jeremy.Wu
  Source: https://www.cnblogs.com/jeremywucnblog/
  This article belongs to the author and blog Park total, welcome to reprint, but without the author's consent declared by this section must be retained, and given the apparent position of the article page the original connection, otherwise the right to pursue legal responsibilities.

Guess you like

Origin www.cnblogs.com/jeremywucnblog/p/12083102.html
Recommended