HTML01

HTML

HTML、CSS和Javascript的区别

HTML:noun,是内容

CSS:adj,加上效果

Javascript:verb,让字动

入门

HTML kind of like the nouns of a Web page, it is the structure of the content.

It’s the what is on the page.

​ This is a button.

​ This is a form.

​ This is a link.

But it is not the style that counts.It’s not the behavior that would be JavaScript.

HTML element

​ 通过html tags来创造element:opening tag + closing tag

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-5OpD06Ge-1621565875708)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20210520113739141.png)]

wiki

HTML、CSS和JavaScript的百科全书:

MDN Web Docs (mozilla.org)

HTML所用的element:

HTML elements reference - HTML: HyperText Markup Language | MDN (mozilla.org)

ELement 对象

自然段

<p>Chicken</p>

heading

一页中最好只有一个h1:
<h1>Chicken</h1>
用lorem生成随机文本:
<h2>Terminology</h2>
<p>Lorem ipsum dolor</p> 

样本文件(Boilerplate)

样本文件

  1. <!DOCTYPE html>告诉浏览器,这是html 5
  2. HTML 元素表示HTML文档的根(顶级元素),因此也称为根元素。所有其他元素必须是该元素的后代
  3. 一个头后接一个
  4. The HTML <head> element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
  5. title 是百度中的结果标题,是显示在标签卡上的字,不会显示在页面上
  6. <body>包含所有内容
  7. VScode中用!打开

list element

  1. ordered list:ol
   <ol>
       <li>Silkie</li>
       <li>Polish</li>
       <li>TEE </li>
   </ol>
  1. unordered list:ul

    Zero or more <li>, <script>and <template>elements.

  <ul>
     <li>Silkie</li>
     <li>Polish</li>
     <li>TEE </li>
 </ul> 
  1. 也可也嵌套
 <ul>
     <li>Silkie</li>
     	<ol>
         	<li>Silkie</li>
     		<li>Polish</li>
     		<li>TEE </li>
     	</ol>
     <li>Polish</li>
     <li>TEE </li>
 </ul>

Anchor Tags

​ 用来加入超链接,a后的属性href填写指向的连接。

为什么要加https?

​ 不加浏览器默认文件协议,从而通过连接去本地的文件,所以要加https

<p>You can reach Michael at:</p>

<ul>
  <li><a href="https://example.com">Website</a></li>
  <li><a href="mailto:m.bluth@example.com">Email</a></li>
  <li><a href="tel:+123456789">Phone</a></li>
</ul>

图片

alt:方便视障人士听

src:可以加入本地资源

<img class="fit-picture"
     src="/media/cc0-images/grapefruit-slice-332-332.jpg"
     alt="Grapefruit slice atop a pile of other slices">

注释

<!--注释内容--> ctrl+/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值