Home Web Front-end HTML Tutorial HTML&CSS_html/css_WEB-ITnose

HTML&CSS_html/css_WEB-ITnose

Jun 24, 2016 am 11:51 AM

一、HTML

标签
使用该标签描述网页的具体摘要信息,包括文档内容类型,字符编码信息,搜索关键字,网站提供的功能和服务的详细描述等。标签描述的内容并不显示,其目的是方便浏览器解析或利于搜索引擎搜索,它采用“名称/值”对的方式描述摘要信息。
1)文档内容类型,字符编码信息

     >名称:Content-Type(文档内容类型)
     >值:text/html; charset=gb2312
2)搜索关键字和内容描述信息


实现的方式:“名称|值”对的形式,keywords表示搜索关键字,description表示网站内容的具体描述。

块级标签
和行级标签相比,块级标签具有如下特点:
    1,前后断行显示,块级标签比较“霸道”,默认状态下占据一整行。
    2,具有一定的宽度和高度。
    3,块级标签常用作容器

特殊符号
   空格
   大于号>
   小于号<
   双引号"
   版权符号©

 

二、CSS

常用文本属性
line-height          行高
text-align            对齐方式
letter-spacing      字符间距
text-decoration    文本修饰    常用属性值有:underline 下划线 none 无样式
white-space         如何处理空白   white-space="nowrap"  文本溢出不换行

重要背景属性
background-repeat     平铺方式       no-repeat,repeat-x,repeat-y
background-position   初始位置

盒模型层次(3D)从上往下看
第一层: border
第二层: Content(内容),padding
第三层: background-image
第四层: background-color
第五层: margin

超链接伪类
a:link          未单击访问时
a:visited      单击访问后
a:hover       鼠标悬浮其上时
a:active       鼠标单击未释放时

多选择器的组合
li.           标签+类                    li.pic{}类名为pic的

  • 标签样式
    div#       标签+id                    div#nav{}id为"nav"的
    标签样式
    # .         id+空格+类               #nav .pic{}id为"nav"元素内的pic类样式
    # . ,       id+空格+类+逗号       #nav .pic,#nav .text{}id为"nav"元素内的pic和text类的样式

     

     

  • 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

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

    The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

    What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

    The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

    Is HTML easy to learn for beginners? Is HTML easy to learn for beginners? Apr 07, 2025 am 12:11 AM

    HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

    What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

    The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

    What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

    The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

    What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

    The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

    The Roles of HTML, CSS, and JavaScript: Core Responsibilities The Roles of HTML, CSS, and JavaScript: Core Responsibilities Apr 08, 2025 pm 07:05 PM

    HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

    What is an example of a starting tag in HTML? What is an example of a starting tag in HTML? Apr 06, 2025 am 12:04 AM

    AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

    See all articles