HTML, CSS and JS are the main parts of a webpage: HTML defines the structure of a webpage, CSS describes the appearance of a webpage, and JS sets the behavior of a webpage. For example: HTML is like a person's bones and organs, CSS is human skin, these two constitute a vegetative person, plus js, a vegetative person, can respond to external stimuli, can think, move, and is a living person.
I have been working for many years and have been busy applying various technologies. Now that I am not busy anymore, I ask myself what I am doing and what I can’t answer. Come to think of it, at work, we are often asked to achieve a goal quickly and cost-effectively, and use Du Niang to solve problems, but we don’t have time to understand the reasons. Today, I will summarize it from a macro perspective.
Introduction to HTML, CSS, JavaScript and simple division of labor
1. What is HTML (Hyper Text Markup Language)? HTML is used to describe web pages a language.
2. CSS (Cascading Style Sheets), the style defines how to display HTML elements, the syntax is: selector {property: value} (selector {property: value})
3. JavaScript is a script language, its source code does not need to be compiled before being sent to the client for execution. Instead, the character code in text format is sent to the browser for interpretation and execution by the browser.
For a web page, HTML defines the structure of the web page. CSS describes the appearance of a web page, and JavaScript settings. A very classic example is that HTML is like a person's bones and organs, and CSS is like human skin. With these two things, a vegetative person is formed, and with the addition of JavaScript, the vegetative person becomes You can respond to external stimuli, think, move, give yourself plastic surgery (change CSS), etc., and become a living person.
If HTML is the body, CSS is the surface, and Javascript is the soul. Without Javascript, HTML CSS is a vegetative state. Without Javascript and CSS, it is a disfigured vegetative state.
If HTML is the architect, CSS is the decoration, and Javascript is the magician.
How to connect these three together? Of course, it must be through the HTML of the web page. HTML is a description language. It describes itself to the browser, so how does it usually describe the specific web page? ?
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <meta> <title>网页标题</title> <link> <script></script> <p>这是一个段落</p>
This is the simplest HTML document. What the document says is that for browsers, I follow the W3C standard XHTML1.0 transitional version specification (file type declaration). The encoding I use is utf-8, my title is "webpage title", the style sheet describing my appearance is my mycss.css file in the same directory, the javascript code related to me is in my myks.js file at the same level, my content There is a paragraph and the content of the paragraph is "This is a paragraph".
The above is the detailed content of What is the relationship between html/css/js. For more information, please follow other related articles on the PHP Chinese website!

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.

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.

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

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

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version
Chinese version, very easy to use

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
