【代码笔记】Web-HTML-CSS
2024-10-21 04:13:02
一,效果图。
二,代码。
<!DOCTYPE html>
<html> <head>
<meta charset="utf-8">
<title>html css</title>
<!--html使用样式-->
<style type="text/css">
h1 {
color: red;
} p {
color: blue;
}
</style>
<!--链接到一个外部样式表-->
<link rel="stylesheet" type="text/css" href="styles.css">
<!--内部样式表-->
<style type="text/css">
body {
background-color: yellow;
} p {
color: blue;
}
</style>
<!--外部样式表-->
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head> <body style="">
<h1>This is heading</h1>
<p>This is paragraph</p>
<!--style属性制作一个没有下划线的链接-->
<a href="http://www.baidu.com" style="text-decoration:none">百度</a>
<h1>I am formatted with an external style sheet</h1>
<p>Me too</p>
<!--内联样式-->
<p style="color:blue;margin-left=20px;">this is a paragraph</p>
<!--背景颜色-->
<h2 style="">this is a heading</h2>
<p style="">this is a paragraph.</p>
<!--字体,字体颜色,字体大小-->
<h1 style="font-family:verdana;">A heading</h1>
<p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p>
<!--文本对齐方式-->
<h1 style="text-align:center;">Center-aligned heading</h1>
<p> this is a paragraph</p>
</body> </html>
参考资料:《菜鸟教程》
最新文章
- 利用 Django REST framework 编写 RESTful API
- 真机测试无缘无故finish了。程序也没有启动
- const,static,extern简介(重要)
- activiti搭建(五)BPMN介绍
- Virtualizing WrapPanel VS toolkit:WrapPanel
- 通过一个简单的数据库操作类了解PHP链式操作的实现
- hdu 4937 Lucky Number
- 用php生成word文档
- [原创]# 玩转nginx系列
- 安装CDH
- RandomAccessFile类进行文件加密
- ORA-01034: ORACLE not available问题
- Express全系列教程之(五):Express的中间件
- MyEclipse创建Web项目入门指南
- java学习笔记6(面向对象1:概念,private)
- guns使用注意问题
- gateio API
- javascript之构造函数的继承(引用网络)
- 十一、curator recipes之联锁InterProcessMultiLock
- git团队操作
热门文章
- 使用 IncrediBuild 提升 VisualStudio 编译速度
- Codeforces gym102152 K.Subarrays OR
- 利用phpcms后台漏洞渗透某色情网站
- react小知识2
- 如何设置 sass 全局变量,js如何使用 sass 变量
- JS应用实例1:注册页面表单校验
- 分布式控制系统Git学习
- hystrix降级初步学习
- LeetCode:105_Construct Binary Tree from Preorder and Inorder Traversal | 根据前序和中序遍历构建二叉树 | Medium
- web自动化测试---第一个自动化测试用例