教程
89个主题在此版面
-
Pixels to Ems ConversionPixel to Em ConverterThe tool below allows you to work out the em sizes from pixels (or vice versa). Set a default pixel size for body (usually 16px) Then, convert a pixel value to em, based on the default pixel size Or, convert an em value to pixels, based on the default pixel size Set a default pixel size: px Convert PX to EM: px Convert EM to PX: em Convert Result: Body Font SizeIn the table below, select a body font size in pixels (px) to display a complete "px to em and percent" conversion table. Tip: The default font size is usually 16px. What is the difference between PX, EM and Percent? Pixel is a static measurement, while percent a…
-
- 0 篇回复
- 71 次查看
-
-
HTTP Request Methods What is HTTP? The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. HTTP works as a request-response protocol between a client and server. Example: A client (browser) sends an HTTP request to the server; then the server returns a response to the client. The response contains status information about the request and may also contain the requested content. HTTP Methods GET POST PUT HEAD DELETE PATCH OPTIONS CONNECT TRACE The two most common HTTP methods are: GET and POST. The GET Method GET is used to request data from a specified resource. Note that the query string…
-
- 0 篇回复
- 51 次查看
-
-
HTTP Status Messages HTML Error Messages When a browser requests a service from a web server, an error might occur, and the server might return an error code like "404 Not Found". It is common to name these errors HTML error messages. But these messages are something called HTTP status messages. In fact, the server always returns a message for every request. The most common message is 200 OK. Below is a list of HTTP status messages that might be returned: 1xx: Information Message: Description: 100 Continue The server has received the request headers, and the client should proceed to send the request body 101 Switching Protocol…
-
- 0 篇回复
- 48 次查看
-
-
HTML Language Code Reference ISO Language Codes You should always include the lang attribute inside the <html> tag, to declare the language of the Web page. This is meant to assist search engines and browsers: <html lang="en"> ... </html> In XHTML, the language is declared inside the <html> tag as follows: <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> ... </html> ISO 639-1 Language Codes ISO 639-1 defines abbreviations for languages: See also: Reference for Country Codes. Language ISO Code Abkhazian ab Afar aa Afrikaans af Akan ak Albanian sq Amharic am Arabic ar Aragon…
-
- 0 篇回复
- 41 次查看
-
-
HTML URL Encoding Reference URL - Uniform Resource Locator Web browsers request pages from web servers by using a URL. The URL is the address of a web page, like: https://www.w3schools.com. URL Encoding (Percent Encoding) URL encoding converts characters into a format that can be transmitted over the Internet. URLs can only be sent over the Internet using the ASCII character-set. Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format. URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. URLs cannot contain spaces. URL encoding normally replaces a space with a …
-
- 0 篇回复
- 31 次查看
-
-
HTML Character Sets Common HTML Character Sets The default character set in HTML5 is UTF-8. For a closer look, visit our Complete HTML Character Set Reference. Number ASCII ANSI 8859-1 UTF-8 Description 32 space 33!!!!exclamation mark 34""""quotation mark 35####number sign 36$$$$dollar sign 37%%%%percent sign 38&&&&ersand 39''''apostrophe 40((((left parenthesis 41))))right parenthesis 42****asterisk 43++++plus sign 44,,,,comma 45----hyphen-minus 46....full stop 47////solidus 480000digit zero 491111digit one 502222digit two 513333digit three 524444digit four 535555digit five 546666digit six 557777digit seven 568888digit eight 579999digit ni…
-
- 0 篇回复
- 30 次查看
-
-
HTML <!DOCTYPE> The HTML Document Type All HTML documents must start with a <!DOCTYPE> declaration. The declaration is not an HTML tag. It is an "information" to the browser about what document type to expect. In HTML5, the <!DOCTYPE> declaration is simple: <!DOCTYPE html> In older documents (HTML 4 or XHTML), the declaration is more complicated because the declaration must refer to a DTD (Document Type Definition). <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> You …
-
- 0 篇回复
- 26 次查看
-
-
HTML Audio/Video DOM Reference HTML Audio and Video DOM Reference The HTML5 DOM has methods, properties, and events for the <audio> and <video> elements. HTML Audio/Video Methods Method Description addTextTrack() Adds a new text track to the audio/video canPlayType() Checks if the browser can play the specified audio/video type load() Re-loads the audio/video element play() Starts playing the audio/video pause() Pauses the currently playing audio/video HTML Audio/Video Properties Property Description audioTracks Returns an AudioTrackList object representing available audio tracks autoplay Sets or returns whe…
-
- 0 篇回复
- 37 次查看
-
-
HTML Canvas Reference The <canvas> element defines a bitmapped area in an HTML page. The Canvas API allows JavaScript to draw graphics on the canvas. The Canvas API can draw shapes, lines, curves, boxes, text, and images, with colors, rotations, transparencies, and other pixel manipulations. You can add a canvas element anywhere in an HTML page with the <canvas> tag: Example <canvas id="myCanvas" width="300" height="150"></canvas> You can access a <canvas> element with the HTML DOM method getElementById(). To draw in the canvas you need to create a 2D context object: const myCanvas = document.getElementById("myCanvas");…
-
- 0 篇回复
- 25 次查看
-
-
HTML Study Plan Introduction The HTML study plan helps you teach your students HTML step-by-step. Creating a study plan for HTML is easy. You can use a pre-built study plan or customize it. Students have different skill levels. The study plans can be customized to ensure that everyone is challenged. Save time with pre-built teacher materials and study plans. Easily organize your class with a timeline from the introduction of HTML to the final exam. W3Schools Academy This study plan is a feature of W3Schools Academy. W3Schools Academy is a platform that has everything you need to teach coding, all in one place. It offers you as a teacher a toolbox of features t…
-
- 0 篇回复
- 25 次查看
-
-
HTML Event Attributes Global Event Attributes HTML has the ability to let events trigger actions in a browser, like starting a JavaScript when a user clicks on an element. To learn more about programming events, please visit our JavaScript tutorial. Below are the global event attributes that can be added to HTML elements to define event actions. Window Event Attributes Events triggered for the window object (applies to the <body> tag): Attribute Value Description onafterprint script Script to be run after the document is printed onbeforeprint script Script to be run before the document is printed onbeforeunload script Script to be run when the docum…
-
- 0 篇回复
- 27 次查看
-
-
HTML Reference - Browser Support HTML Reference With Browser Support The table below lists all HTML elements and their attributes, along with browser support: <a> Yes Yes Yes Yes Yes download 14.0 18.0 20.0 10.1 15.0 href Yes Yes Yes Yes Yes hreflang Yes Yes Yes Yes Yes media Yes Yes Yes Yes Yes ping Yes No Yes No Yes referrerpolicy 51.0 79.0 50.0 11.1 38.0 rel Yes Yes Yes Yes …
-
- 0 篇回复
- 26 次查看
-
-
HTML Global Attributes HTML Global Attributes The global attributes are attributes that can be used with all HTML elements. Attribute Description accesskey Specifies a shortcut key to activate/focus an element class Specifies one or more classnames for an element (refers to a class in a style sheet) contenteditable Specifies whether the content of an element is editable or not data-* Used to store custom data private to the page or application dir Specifies the text direction for the content in an element draggable Specifies whether an element is draggable or not enterkeyhint Specifies the text of the enter-key on a virtual keyboard hidden Specifie…
-
- 0 篇回复
- 25 次查看
-
-
HTML Attribute Reference HTML Attribute Reference The table below lists all HTML attributes and what elements they can be used within: Attribute Belongs to Description accept <input> Specifies the types of files that the server accepts (only for type="file") accept-charset <form> Specifies the character encodings that are to be used for the form submission accesskey Global Attributes Specifies a shortcut key to activate/focus an element action <form> Specifies where to send the form-data when a form is submitted align Not supported in HTML 5. Specifies the alignment according to surrounding elements. Use CSS instead alt <area…
-
- 0 篇回复
- 26 次查看
-
-
HTML Element Reference HTML Tags Ordered Alphabetically Tag Description <!--...--> Defines a comment <!DOCTYPE> Defines the document type <a> Defines a hyperlink <abbr> Defines an abbreviation or an acronym <acronym> Not supported in HTML5. Use <abbr> instead. Defines an acronym <address> Defines contact information for the author/owner of a document <applet> Not supported in HTML5. Use <embed> or <object> instead. Defines an embedded applet <area> Defines an area inside an image map <article> Defines an article <aside> Defines content aside from the page content …
-
- 0 篇回复
- 28 次查看
-
-
HTML Accessibility HTML Accessibility Always write HTML code with accessibility in mind! Provide the user a good way to navigate and interact with your site. Make your HTML code as semantic as possible. Semantic HTML Semantic HTML means using correct HTML elements for their correct purpose as much as possible. Semantic elements are elements with a meaning; if you need a button, use the <button> element (and not a <div> element). Semantic <button>Report an Error</button> Non-semantic <div>Report an Error</div> Semantic HTML gives context to screen readers, which read the contents of a page out loud. Wit…
-
- 0 篇回复
- 23 次查看
-
-
You Have Learned HTML, Now What? HTML Summary This tutorial has taught you how to use HTML to create your own web site. HTML is the universal markup language for the Web. HTML lets you format text, add graphics, create links, input forms, frames and tables, etc., and save it all in a text file that any browser can read and display. For more information on HTML, please take a look at our HTML examples and our HTML reference. You can also test your HTML skills with HTML Exercises and HTML Quizzes. Now You Know HTML, What's Next? Learn CSS CSS lets you style your HTML pages. CSS gives you total control of the layout, without messing up the document content. To l…
-
- 0 篇回复
- 22 次查看
-
-
W3Schools HTML Certificate W3Schools offers an Online Certification Program. The perfect solution for busy professionals who need to balance work, family, and career building. More than 50 000 certificates already issued! Get Your Certificate » W3Schools offers an Online Certification Program. The perfect solution for busy professionals who need to balance work, family, and career building. More than 50 000 certificates already issued! Get Your Certificate » Document your skills Improve your career Study at your own pace Save time and money Known brand Trusted by top companies Who Should Consider Getting Cer…
-
- 0 篇回复
- 23 次查看
-
-
W3Schools HTML Bootcamp HTML & CSS Bootcamp Learn with W3Schools. Live online learning sessions. Duration: 3 Weeks. Learn More Live Online Bootcamp In this bootcamp, you will learn the foundational skills needed to create beautiful and functional websites, from writing HTML markup to styling your pages with CSS. You will learn HTML and CSS over a 3 weeks period together with a live instructor and an interactive cohort of engaged learners! You Will Learn HTML and CSS fundamentals including Elements, Attributes, Tables, Forms and more. How to write best fit Semantic HTML How to create…
-
- 0 篇回复
- 24 次查看
-
-
HTML Interview Preparation Try W3Schools' comprehensive Front-End interview preparation feature. A tool that will help you get ready for your next interview. W3Schools interview preparation is an interactive feature powered by AI, where you can select the role of the interviewer, ask questions, and receive guidance. After the interview training you will get an evaluation of your performance that you can use to improve yourself. What to expect in a Front-End interview If you are going to a Front-End interview, there are a few things you can expect: Coding Questions: You will be asked coding questions, and you possibly also get a task to solve. Exam…
-
- 0 篇回复
- 27 次查看
-
-
HTML Comments HTML comments are not displayed in the browser, but they can help document your HTML source code. HTML Comment Tag You can add comments to your HTML source by using the following syntax: <!-- Write your comments here --> Notice that there is an exclamation point (!) in the start tag, but not in the end tag. Note: Comments are not displayed by the browser, but they can help document your HTML source code. Add Comments With comments you can place notifications and reminders in your HTML code: Example <!-- This is a comment --> <p>This is a paragraph.</p> <!-- Remember to add more information here --> …
-
- 0 篇回复
- 22 次查看
-
-
HTML Div Element The <div> element is used as a container for other HTML elements. The <div> Element The <div> element is by default a block element, meaning that it takes all available width, and comes with line breaks before and after. Example A <div> element takes up all available width: Lorem Ipsum <div>I am a div</div> dolor sit amet. Result Lorem Ipsum I am a div dolor sit amet. The <div> element has no required attributes, but style, class and id are common. <div> as a container The <div> element is often used to group sections of a web page together. Example A <div>…
-
- 0 篇回复
- 25 次查看
-
-
HTML Block and Inline Elements Every HTML element has a default display value, depending on what type of element it is. The two most common display values are block and inline. Block-level Elements A block-level element always starts on a new line, and the browsers automatically add some space (a margin) before and after the element. A block-level element always takes up the full width available (stretches out to the left and right as far as it can). Two commonly used block elements are: <p> and <div>. The <p> element defines a paragraph in an HTML document. The <div> element defines a division or a section in an HTML document. Th…
-
- 0 篇回复
- 23 次查看
-
-
HTML Lists HTML lists allow web developers to group a set of related items in lists. Example An unordered HTML list: Item Item Item Item An ordered HTML list: First item Second item Third item Fourth item Unordered HTML List An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items will be marked with bullets (small black circles) by default: Example <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> Ordered HTML List An ordered list starts with the <ol> tag. Each list item starts with the <li&…
-
- 0 篇回复
- 17 次查看
-
-
HTML Tables HTML tables allow web developers to arrange data into rows and columns. Example Company Contact Country Alfreds Futterkiste Maria Anders Germany Centro comercial Moctezuma Francisco Chang Mexico Ernst Handel Roland Mendel Austria Island Trading Helen Bennett UK Laughing Bacchus Winecellars Yoshi Tannamuri Canada Magazzini Alimentari Riuniti Giovanni Rovelli Italy Define an HTML Table A table in HTML consists of table cells inside rows and columns. Example A simple HTML table: <table> <tr> <th…
-
- 0 篇回复
- 22 次查看
-