Day10:html和css

标题图

Day10:htmlcss

<html>
<body>
<h1>标题</h1>
<p>段落</p>
</body>
</html>

HTML 是用来描述网页的一种语言,超文本标记语言,不是一种编程语言,而是一种标记语言,是一套标记标签,使用标记标签来描述网页。

HTML 标签

HTML 文档描述网页

<html> 与 </html> 描述网页
<body> 与 </body> 页面内容
<h1> 与 </h1> 标题
<p> 与 </p> 段落

HTML 标题

<h1> - <h6>

HTML 段落

 <p> 标签

HTML 链接

 <a> 标签

HTML 图像

<img> 标签

HTML 元素语法

以开始标签起始,以结束标签终止,某些 HTML 元素具有空内容,大多数 HTML 元素可拥有属性。

<html>
<body>
<p></p>
</body>
</html>
<p> 元素
<body> 元素
<html> 元素
<h1> 定义标题的开始
<body> 定义 HTML 文档的主体
<table> 定义 HTML 表格
class 规定元素的类名
id 规定元素的唯一 id
style 规定元素的行内样式
<center>	定义居中的内容。
<font> 和 <basefont>	定义 HTML 字体。
<s> 和 <strike>	定义删除线文本
<u>	定义下划线文本
align	定义文本的对齐方式
bgcolor	定义背景颜色
color	定义文本颜色
<code>
<pre></pre>
</code>

HTML 链接 - target 属性

 target="_blank"

name 属性规定锚(anchor

<img> 是空标签

<img src="url" />

表格

<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
<table border="1">
<tr>
<td>Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
</table>

无序列表

<ul>
<li>1</li>
<li>2</li>
</ul>

有序列表

<ol>
<li>1</li>
<li>2</li>
</ol>

<div><span>

header	定义文档或节的页眉
nav	定义导航链接的容器
section	定义文档中的节
article	定义独立的自包含文章
aside	定义内容之外的内容
footer	定义文档或节的页脚
details	定义额外的细节

iframe 的语法

<iframe src="URL"></iframe>

HTML 头部元素

<title> 标签定义文档的标题
<title>Title of the document</title><base> 标签为页面上的所有链接规定默认地址或默认目标(target)
<base target="_blank" /><link> 标签定义文档与外部资源之间的关系
<link rel="stylesheet" type="text/css" href="mystyle.css" /><style> 标签用于为 HTML 文档定义样式信息
<style type="text/css">
body {background-color:yellow}
p {color:blue}
</style><meta> 标签提供关于 HTML 文档的元数据
<meta name="description" content="" /><script> 元素

统一资源定位器

URL 称为网址

http	超文本传输协议
https	安全超文本传输协议
ftp	文件传输协议

<!DOCTYPE> 声明帮助浏览器正确地显示网页

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head><body></body></html>

什么是 Canvas

// 使用 JavaScript 在网页上绘制图像
<canvas id="myCanvas" width="200" height="100"></canvas><script type="text/javascript">
var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.fillStyle="#FF0000";
cxt.fillRect(0,0,150,75);
</script>

html5新标签

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Demo</title><style>header {width: 200px;height: 100px;background-color: red;}nav {width: 300px;height: 100px;background-color: pink;}</style>
</head>
<body><header></header><nav>上</nav><aside></aside><article></article><time>12</time>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Demo</title><style>fieldset {width: 300px;}</style>
</head>
<body><input type="text" value="请输入" list="star"/><datalist id="star"><option value=""></option><option value=""></option><option value=""></option><option value=""></option><option value=""></option></datalist><fieldset><legend>登录</legend>用户名: <input type="text"> <br>密码: <input type="password"></fieldset>	
</body>
</html>
// 表单
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Demo</title>
</head>
<body><form action="">用户名: <input type="text" placeholder="请输入用户名" autofocus> <br />上传头像: <input type="file" name="" id="" multiple > <br />昵称:  <input type="text" required accesskey="s"> <br /><input type="submit" value="提交按钮"></form>
</body>
</html>
// 视频
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Demo</title>
</head>
<body><iframe height=200 width=200 src='' frameborder=0 'allowfullscreen'></iframe>
</body>
</html>
// 视频
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Demo</title>
</head>
<body><audio  controls loop><source src=".mp3"/><source src=".ogg"/></audio><video autoplay  controls><source  src=".ogg"/><source  src=".mp4"/></video>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Demo</title><style>p::selection {  /*选择文字时候的状态*/background-color: pink;color: yellow;}</style>
</head>
<body><p>中国</p>
</body>
</html>
// 表单
<!DOCTYPE html>
<html lang="en"><head><meta charset="utf-8"></head><body><form action=""><fieldset><legend>学生档案</legend><label>姓名: <input type="text" placeholder="请输入学生名字"/></label> <br /><br /><label>手机号: <input type="tel" /></label> <br /><br /><label>邮箱: <input type="email" /></label> <br /><br /><label>所属学院:  <input type="text" placeholder="请选择学院" list="xueyuan"/><datalist id="xueyuan"><option>学院</option><option>学院</option><option>学院</option><option>学院</option></datalist><br /><br /><label>出生日期:   <input type="date" /></label> <br /><br /><label>成绩:  <input type="number" /></label> <br /><br /><label>毕业时间:  <input type="date" /></label> <br /><br /><input type="submit" />  <input type="reset" /></fieldset></form></body>
</html>

效果

效果

如果看了觉得不错

点赞!转发!

达叔小生:往后余生,唯独有你
You and me, we are family !
90后帅气小伙,良好的开发习惯;独立思考的能力;主动并且善于沟通
简书博客: 达叔小生
https://www.jianshu.com/u/c785ece603d1

结语

  • 下面我将继续对 其他知识 深入讲解 ,有兴趣可以继续关注
  • 小礼物走一走 or 点赞

转载于:https://www.cnblogs.com/dashucoding/p/11140364.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/278485.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

如何在PowerPoint演示文稿中使用iTunes音乐

One of PowerPoint’s charms is its ability to play music during the presentation. Adding music to your presentation is simple, but using a song from your iTunes library requires a few extra steps. Here’s how to use iTunes music in PowerPoint. PowerPoint的…

Android:DELETE_FAILED_INTERNAL_ERROR Error while Installing APKs

Android studio DELETE_FAILED_INTERNAL_ERROR Error while Installing APKs 一、报错信息 DELETE_FAILED_INTERNAL_ERRORError while Installing APKs 二、报错原因 在一些机型上安装软件 提示卸载原先的软件 但是又安装不上新软件 三、解决方法&#xff1a; File->Settin…

hotmail_在新的Hotmail Wave 4中禁用Messenger

hotmailAre you annoyed by having Messenger automatically sign in when you’re reading your emails in the new Hotmail? Here’s how you can disable the Web Messenger in Hotmail and other Windows Live online apps. 当您在新的Hotmail中阅读电子邮件时&#xff0…

eclipse中将一个项目作为library导入另一个项目中

1. github上搜索viewpagerIndicator: https://github.com/JakeWharton/ViewPagerIndicator2. 下载zip包&#xff0c;解压&#xff0c;eclipse中import->Android Existing Code->(注意只导入解压后下面的Library)3. 导入后标记为Property->Android->isLibrary4. 将i…

论接单报价管理与ERP信息化管理的重要性

中小制造企业两项比较重要的管理工作&#xff1a;接单报价管理与ERP信息化管理。大部分的中小制造企业都存在财务核算基础薄弱、ERP信息化错乱甚至没有的情况。信息沟通不畅&#xff0c;经营过程数据与结果数据无法掌握是很多中小工厂的通病。楼主所知道的是&#xff0c;很多几…

mac无法关机_Mac无法关机时该怎么办

mac无法关机Razvan Franco Nitoi/Shutterstock.com拉兹万佛朗哥尼托伊/Shutterstock.comMacs are like any other computer. Sometimes they won’t start up, and sometimes they won’t shut down. If your Mac is refusing to shut off, here’s how to shut it down anyway…

数串

数串 题目描述 设有n个正整数&#xff0c;将他们连接成一排&#xff0c;组成一个最大的多位整数。 如:n3时&#xff0c;3个整数13,312,343,连成的最大整数为34331213。 如:n4时,4个整数7,13,4,246连接成的最大整数为7424613。 输入描述: 有多组测试样例&#xff0c;每组测试样…

chromebook刷机_如何在Chromebook上拍照

chromebook刷机Your Chromebook comes equipped with a built-in camera you can use to snap pictures to post to your social media accounts or share with friends and family. Here’s how to take a photo on a Chromebook. 您的Chromebook配备了一个内置摄像头&#xf…

树和二叉树简介

一、树 1、什么是树&#xff1f; 树状图是一种数据结构&#xff0c;它是由n&#xff08;n>1&#xff09;个有限节点组成一个具有层次关系的集合。把它叫做“树”是因为它看起来像一棵倒挂的树&#xff0c;也就是说它是根朝上&#xff0c;而叶朝下的。它具有以下的特点&#…

对eventloop的研究

javasctipt是一门单线程的非阻塞的脚本语言&#xff0c;单线程意味着&#xff0c;JavaScript 单线程意味着&#xff0c;javascript代码在执行的任何时候&#xff0c;都只有一个主线程来处理所有的任务。 JavaScript的事件分两种&#xff0c;宏任务(macro-task)和微任务(micro-t…

【SSH高速进阶】——struts2简单的实例

近期刚刚入门struts2。这里做一个简单的struts2实例来跟大家一起学习一下。 本例实现最简单的登陆&#xff0c;仅包括两个页面&#xff1a;login.jsp 用来输入username与password&#xff1b;success.jsp 为登陆成功页面。error.jsp为登陆失败页面。 1、新建web项目“struts2”…

《智能家居》培训第六天------2019-01-10

目录&#xff1a; 一&#xff09;摄像头 二&#xff09;照明 三&#xff09;所想 四&#xff09;总结 一&#xff09;摄像头 摄像头这块学了跟没学一样我觉得&#xff0c;摄像头给的api&#xff0c;yuyv转rgb24也是给的api&#xff0c;总而言之就是&#xff0c;直接给了两个源文…

在Linux上按大小列出文件和目录

This page will show us how to create a list of files and folders ordered by size using standard Linux commands. 该页面将向我们展示如何使用标准Linux命令创建按大小排序的文件和文件夹列表。 命令 (Command) To get a list with the size of each item in a folder, y…

记一次kafka数据丢失问题的排查

2019独角兽企业重金招聘Python工程师标准>>> 数据丢失为大事&#xff0c;针对数据丢失的问题我们排查结果如下。 第一&#xff1a;是否存在数据丢失的问题&#xff1f; 存在&#xff0c;且已重现。 第二&#xff1a;是在什么地方丢失的数据&#xff0c;是否是YDB…

Maximum upload size exceede上传文件大小超出解决

在这里记录三种方法, 努力提高自己的姿势水平 application.yml配置spring:servlet:multipart:enabled: truemax-file-size: 10MB #单个文件最大大小max-request-size: 1024MB #上传数据总大小 application.properties配置spring.servlet.multipart.max-file-size10Mb #单个文件…

ipad iphone开发_如何在iPhone或iPad上更改应用程序的语言

ipad iphone开发BigTunaOnline/Shutterstock.comBigTunaOnline / Shutterstock.comApple’s iOS 13 makes the iPhone and iPad multilingual. Now, you can change the language of an individual app without changing your primary system language. Each app can have its …

Docker最全教程——从理论到实战(七)

Docker最全教程——从理论到实战&#xff08;七&#xff09; 原文:Docker最全教程——从理论到实战&#xff08;七&#xff09;在本系列教程中&#xff0c;笔者希望将必要的知识点围绕理论、流程&#xff08;工作流程&#xff09;、方法、实践来进行讲解&#xff0c;而不是单纯…

Bash Cookbook 学习笔记 【中级】

Read Me 本文是以英文版<bash cookbook> 为基础整理的笔记&#xff0c;力求脱水2018.01.21 更新完【中级】。内容包括工具、函数、中断及时间处理等进阶主题。本系列其他两篇&#xff0c;与之互为参考 【基础】内容涵盖bash语法等知识点。传送门【高级】内容涉及脚本安全…

设置Windows 10时如何创建本地帐户

Windows 10 tries its hardest to make you use a Microsoft account. The option was already hidden, but now it’s not even offered on Windows 10 Home while you’re connected to the internet. Here’s how to create a local account anyway. Windows 10尽最大努力使…

HSQL

Hive的数据存储  1、Hive中所有的数据都存储在 HDFS 中&#xff0c;没有专门的数据存储格式&#xff08;可支持Text&#xff0c;SequenceFile&#xff0c;ParquetFile&#xff0c;RCFILE等&#xff09;  2、只需要在创建表的时候告诉 Hive 数据中的列分隔符和行分隔符&…