第四周的收获

这周主要学习了HTML的标签有头<head></head>,在<body></body>里面写内容,水平线标签用<hr />,size表示<hr size="5"/>,段落标签<p></p>,<p>第一段</p>,以这种方式写;字体标签<font></font>,字体标签的属性有颜色color,大小 size从1到7逐渐变大,7以后都是一样大;还有标签的嵌套;<font color="red" size="3"></font>;加粗<b></b>;斜体<i></i>;图片标签<img/> src图片放的位置,width=150px height=100px alt=“logo 图片”;列表标签:无序表亲<ul> 有序标签<ol>  格式

<ul>                                                     <ol>

<Li>baidu</Li>                           <Li> baidu </Li>

<ul>                                                    <ol>

超链接标签<a></a>         <a href="位置“></a>  target=“—blank”保存原有的界面;href=“#”的时候没有任何效果;

表格标签 <table></table>  属性 border =“1px”线的像素值;width=“100px”hight=“50px”  alight=“center”位置   cellspacing=“ ”边框与边框的间距,cellpadding=“ ”边框与内容之间的间距

<tr>行

<td></td>列

<tr>

表格跨列<td colspan="2"></td>将要删除的哪一行删掉; 跨行 rowspan    width=“100%”hight=“100%”填满色

还学习了java的类,编译了代码


public class xiyoustudent {
static String collagename="西安邮电大学";
String no,name;
void setstudent(String no,String name)
{
 this.no=no;
 this.name=name;
}
void countpass()
{
 int counter=0,score=0;
 do {
  score=(int)(Math.random()*5);
  counter++;
 }while(score<3);
 System.out.println("counter="+counter);
}
}
class Testxiyoustudent
{
 public static void main(String[] args) {
  xiyoustudent zhangsan,lisi;
  zhangsan=new xiyoustudent();
  zhangsan.setstudent("050102", "张三");
  lisi=new xiyoustudent();
  lisi.setstudent("0520101", "李四");
  System.out.println(zhangsan.collagename+",  "+lisi.collagename +", "+xiyoustudent.collagename);
  System.out.println(zhangsan.no+"  ,"+zhangsan.name);
     zhangsan.countpass();
     System.out.println(lisi.no+" ,"+lisi.name);
     lisi.countpass();
    
 }
}

每天写两道pta,看几节大道至简,希望下一周可以看完大道至简,写完读后感,在学习一章java,复习前面的java,学习一章HTML,写出代码。

猜你喜欢

转载自www.cnblogs.com/1234yyf/p/11256978.html