search
HomeWeb Front-endHTML TutorialHTML基础学习笔记_html/css_WEB-ITnose

1、页面

 1、文件结构

......

......

.......
<HTML><HEAD>     <title>, <base>, <link>, <isindex>, <meta></HEAD><BODY>  <h1 id="正文">正文</h1></BODY></HTML>
2、语言字符集信息

基本上所有的网站的网页都有,现在一般都是UTF-8,和GBK2312

3、背景色彩和文字色彩

  • bgcolor --- 背景色彩

  • text --- 非可链接文字的色彩

  • link --- 可链接文字的色彩

  • alink --- 正被点击的可链接文字的色彩

  • vlink --- 已经点击(访问)过的可链接文字的色彩

(颜色RGB16进制)

背景图象

4、页面空白(试了貌似不管用)

页面左边的空白

页面上方的空白(天头)

#=margin amount 5、连接

有下划线的连接

无下划线不像链接

默认的是在原来的窗口打开

 target="Window_Name" (打开一个新的窗口属性)

下面百度是在新窗口打开

<a href="  target="Window_Name">百度</a>
6、标尺线


标尺线的高度:


 

例如:



标尺线的宽度:


例如:



 

标尺线的位置:


#=left, right

例如:


     
 

标尺线的颜色:


例如:


<!doctype html><html> <head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">  <title>Document</title> </head> <body  bgcolor=#ff0033 text=#00ff99 link=#000099 alink=#330099  vlink=##66cc33>  <h1 id="This-nbsp-is-nbsp-a-nbsp-heading">This is a heading</h1><h2 id="This-nbsp-is-nbsp-a-nbsp-heading">This is a heading</h2><h3 id="This-nbsp-is-nbsp-a-nbsp-heading">This is a heading</h3><a href="http://www.baidu.com">百度</a><br/><a name="http://www.baidu.com">百度1</a><hr><hr size=20><hr width=50><hr width=50%><hr width=50%><hr width=50%><hr noshade><hr color=#000000 > </body></html>


2、字体

1、标题字体

字体由大到小


这些标记显示黑体字,自动插入空行

2、字体大小

....#=1,2,3,4,5,6,7

3、物理字体

加粗:....

斜体:.....

下划线:....

打字机文本:...

上标注:

下标注:

删除文本定义:  

<!doctype html><html> <head>  <meta charset="UTF-8">  <title>Document</title> </head> <body>  <b>加粗</b><hr>  <i>斜体</i><hr/>  <u>下划线</u><hr/>  <tt>打字机文本</tt><hr/>  <sup>上标注</sup><hr>  <sub>下标注</sub><hr>  <s>可定义删除文本</s><hr>  <strike>可定义删除文本</strike><hr> </body></html>
4、逻辑字体

强调字体倾斜:

强调字体加粗:

用于表示计算机源代码或者其他机器可以阅读的文本内容:

 短语标签:

键盘文本:

变量的名称

对特殊术语或短语的定义

注释作用:

小型文本:

大字号:

<!doctype html><html> <head>  <meta charset="UTF-8">  <title>Document</title> </head> <body>  <b>加粗</b><hr>  <i>斜体</i><hr/>  <u>下划线</u><hr/>  <tt>打字机文本</tt><hr/>  <sup>上标注</sup><hr>  <sub>下标注</sub><hr>  <s>可定义删除文本</s><hr>  <strike>可定义删除文本</strike><hr>  <h1 id="逻辑字体">逻辑字体</h1>  <em>强调字体倾斜</em><hr>  <strong>强调字体加粗</strong><hr>  <code>用于表示计算机源代码或者其他机器可以阅读的文本内容</code><hr>  <samp>短语标签</samp><hr>  <kdd>键盘文本</kdd><hr>  <var>变量的名称</var><hr>  <dfn>对特殊术语或短语的定义</dfn><hr>  <cite>注释作用</cite><hr>  <small>小型文本</small><hr>  <big>大字号</big> </body></html>

物理风格直接指定字体的“样式”(如粗、斜、下划线);

逻辑风格则是指定文本的“作用”(如示例文字、缩小文字)。

就像去餐馆吃饭,点菜的时候,A告诉炒菜的师傅“炒得多一点”,这是物理风格,直接指定样式;B告诉炒菜的师傅“炒得辣一点”,这是逻辑风格,指定作用。

5、字体颜色

.....

6、客户端字体

7、字符实体

&           &<            <>            >"          "

3、文字布局

1、行的控制

空行:

换行:

不换行

2、文字的对齐

  ...     (

......)
   

...

#=left, center, right
3、文字的分区显示

...
            #=left, center,  right 4、列表

无序列表:

  • .........

有序类表:

  1. ..........

定义列表:

......
.....

定制表中的标记:

  • #=disk,circle,square

    定制有序列表表中的序号:

  • #=A,a,I,i,1
    5、预格式化文本

    .........

    .....

    ......
    6、块引用:

    .......
    7、闪烁

    ......

    <!doctype html><html> <head>  <meta charset="UTF-8">  <title>Document</title> </head> <body><h1 id="中间">中间</h1><div>大家愚人节快乐</div><div>大家愚人节快乐</div><div>大家愚人节快乐</div><blink>块引用</blink><div>Her Song:<blockquote>When I was young, I listened to the radio waiting for my favorite songs....</blockquote></div><h1 id="定制列表元素">定制列表元素</h1><ul><li type=disc>ONE<li type=circle>TWO<li type=square>THREE</ul><h1 id="定制列表-h-dl-dt-Today-dd-Today-nbsp-is-nbsp-yesterday-dt-Tomorrow-dd-Tomorrow-nbsp-is-nbsp-today-dl-h-有序列表">定制列表</h1<dl><dt>Today<dd>Today is yesterday.<dt>Tomorrow<dd>Tomorrow is today.</dl><h1>有序列表</h1><ol><li>Today<li>Tommorow</ol><h1>无序列表</h1<ul><li>Today<li>Tommorow</ul> </body></html>

    4、图像

    1、插入图像基本语法:

    #src对应图片的地址,alt图片的提示内容

    2、图像和文字的对齐

    HTML基础学习笔记_html/css_WEB-ITnose#=top,middle,bottom 分别为上、中、下

    3、边框

    HTML基础学习笔记_html/css_WEB-ITnose #=value

    5、表格

    1、基本语法:

    ...
    - 定义表格
    - 定义表行
    - 定义表头
    - 定义表元(表格的具体数据)

    默认的不带边框,

    带边框的表格:


    2、跨多行,多列的表元

    跨多列的表元

    跨多行的表元

    3、表格尺寸设置 边框尺寸设置:

    表格本身尺寸设置:

    表元间隙设置:


    表元内部空白设置:

    4、表格内文字的对齐和布局

    #=left, center, right

    5、表格在页面的对齐

    #=left right center
    6、表格标题

    7、表格色彩

    ....
    <!doctype html><html> <head>  <meta charset="UTF-8">  <title>HTML</title> </head> <body>  <table border>   <caption >标题</caption>  <tr>      <th bgcolor=ffaa00>HTML</th>  <th bgcolor=#3300cc>MySql</th>  <th rowspan=2 >Css</th>  </tr>  <tr bgcolor=#ffffff><td>A</td><td>B</td>    </tr>  </table> </body></html>
    8、表格中分隔线的显示

    显示所有的分隔线:


    只显示组与组之间的分隔线:

    只显示行与行之间的分隔线:

    只显示列与列之间的分隔线 :

    不显示任何分隔线:


    6、表单

    1、基本语法

    (提交方法一般都是POST或者GET)

    (enctype=”multipart/form-data”提交文件)

    .........

    .........



    一般的数据提交方式都是通过表单来完成的

    下面试表单中提供给用户的输入形式

    文字输入:*=text

    密码输入:*=passwd

    复选框:*=checkbox (默认选中 checked="checked')

    单选框:*=redio

    图像坐标:*=image

    隐藏表单元素:*=hidden

    文件:type=file

    列表选择框:

    文本区域:

    7、移动的文字

    1、基本语法

    .....

    2、文字移动的属性设置

    ..... #=left,right(移动的方向,向右,向左)

    3、方式:

    .....

    #=scroll(一圈一圈绕着走)

    #=slide(只走一次)

    #=alternate (来回走)

    4、循环

    .....  #=次数

    5、速度

    .....  #=速度

    6、延时

    .....  #=时间

    8、多媒体内容











  • Statement
    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
    The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

    The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

    HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

    The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

    The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

    The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

    HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

    The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

    HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

    HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

    HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

    HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

    From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

    HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

    Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

    WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

    See all articles

    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

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    Atom editor mac version download

    Atom editor mac version download

    The most popular open source editor

    SublimeText3 Linux new version

    SublimeText3 Linux new version

    SublimeText3 Linux latest version

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    SublimeText3 English version

    SublimeText3 English version

    Recommended: Win version, supports code prompts!

    SAP NetWeaver Server Adapter for Eclipse

    SAP NetWeaver Server Adapter for Eclipse

    Integrate Eclipse with SAP NetWeaver application server.