Home > Web Front-end > HTML Tutorial > LN :跟着W3School学HTML 004_html/css_WEB-ITnose

LN :跟着W3School学HTML 004_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:17:00
Original
1095 people have browsed it

LN :跟着W3School学HTML 004

内容参考自W3School

HTML 教程

HTML属性

  • HTML 属性总是以名称/值对的形式出现,比如:name="value"。
  • 属性总是在 HTML 元素的开始标签中规定。
  • 实例解析

    1.HTML 链接由 标签定义。链接的地址在 href 属性中指定:

    <a href="http://www.cnblogs.com/renleimlj/">This is a link to my blog.</a>
    Copy after login

    This is a link to my blog.

    2.

    拥有关于对齐方式的附加信息:

    <h1 align="center">This is heading 1</h1>
    Copy after login
    This is heading 1

    3. 拥有关于背景颜色的附加信息。

    <html><body bgcolor="yellow"><h2>Yellow!</h2></body></html>
    Copy after login

    Yellow!

    HTML tips

  • 始终为属性值加引号
  • 在某些个别的情况下,比如属性值本身就含有双引号,那么您必须使用单引号,例如:
    name='Bill "HelloWorld" Gates'
  • 完整的 HTML 参考手册
  • HTML 标准属性参考手册
  • Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template