search
HomeWeb Front-endHTML Tutorial前端新人学习笔记-------html/css/js基础知识点 - 不穿裤子的衣服

即将毕业的软件工程大学生一枚,秋季招聘应聘的是Android,今年来到公司实习,要求做前端开发,所以一切只有现学,现在根据视频来学习,然后开这个博客记录一下自己的学习过程,废话不多说,开写。

4月6日学到的知识点:

  一:

       !   声明,注意的意思;

      doc document 文档的意思;

      type 类型的意思;

      html就不用解释了;

    连在一起的意思就是:注意,文档的类型是HTML。也就是声明你写的文件的文档类型,方便浏览器解析。

 二:

     声明代码的编码格式

     注意:有些时候你声明了以UTF-8编码,但是在实际网页中中文还是显示乱码,这时候你可以去看看保存文件的时候是否采用UTF-8编码保存,因为只有保存文件的格式和网页声明的编码一致才不会导致乱码。

 三:CSS样式表

    三种形式:内部样式表,外部样式表(),内联样式表。 

 四:background复合属性

     repeat:背景图重复,默认就是背景图重复,还有no-repeat(背景图不重复),repeat-x(水平轴上背景图重复),repeat-y(竖直背景图重复)

     10px(x轴),50px(Y轴)也可为负数。center top(水平居中,竖直在顶端),fixed(背景固定,不管怎么拖动滚动条,该背景图都固定在相应位置。)

 五:border复合属性

     border-width:边框宽度;

     border-style:边框样式;(solid 实线,dashed 虚线,dotted 点线,IE6不兼容)

     border-color:边框颜色;

 六:padding内边距

     padding属性:上右下左

     注意:内边距相当于给一个盒子加了填充厚度会影响盒子的大小,若想盒子大小保持不变,就要减少相应长宽.

 七:margin外边距

     块与块之间的距离。

     注意:1,上下外边距会叠加,即上下两个div,设置上一个div的margin-bottom为30px,设置下面div的margin-top为30px,设置后总的外边距还是为30px,不会为60px;

              2,

若设置box2的margin-top为10px,它的父div依旧也会有margin-top=10px的现象,即父子级包含的时候子级的margin-top会传递给父级。

    设置margin-right:auto,被设置对象会靠左;

    设置margin-left:auto,被设置对象会靠右;

    设置margin:auto 0 ,被设置对象会水平居中。

  八:盒模型

  九:常见样式

      结构样式:width:宽度;

                    height:高度;

                    background:背景;

                    border:边框;

                    padding : 内边距;

                    margin: 外边距;

      文本样式:font-size:文字大小(一般为偶数,最小一般设置为12px)

                    font-family:字体;

                    color:文字颜色;

                    line-hight:行高;

                    text-align:文本对齐方式;

                    text-indent:文本缩进(2em);

                    font-weight:文字着重;

                    font-style:文字倾斜;

                    text-decaration:文本修饰(下划线,上划线,删除线)

                    letter-spacing:字母间距;

                    word-spacing:单词间距;

以上是今日所学的所有知识点总结,多学多用多记,fighting!!!!!!!!!!!!!!!

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
What is the difference between an HTML tag and an HTML attribute?What is the difference between an HTML tag and an HTML attribute?May 14, 2025 am 12:01 AM

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The Future of HTML: Evolution and TrendsThe Future of HTML: Evolution and TrendsMay 13, 2025 am 12:01 AM

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

Why are HTML attributes important for web development?Why are HTML attributes important for web development?May 12, 2025 am 12:01 AM

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

What is the purpose of the alt attribute? Why is it important?What is the purpose of the alt attribute? Why is it important?May 11, 2025 am 12:01 AM

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

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 Article

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor