设计开发
-
HTML Buttons Buttons let users interact with a web page. They can submit forms, run JavaScript, or trigger different actions when clicked. HTML Button The HTML <button> element defines a clickable button. By itself, the button does nothing until you add an action to it. Example <button>Click Me</button> Styling HTML Buttons Buttons are often styled with CSS: Example <button class="mytestbtn">Green Button</button> Disabled Buttons Use the disabled attribute to make a button unclickable: Example <button disabled>Disabled Button</button> Tip: Disabled buttons cannot be clicked and usually a…
-
- 0 篇回复
- 21 次查看
-
-
HTML Favicon A favicon is a small image displayed next to the page title in the browser tab. How To Add a Favicon in HTML You can use any image you like as your favicon. You can also create your own favicon on sites like https://www.favicon.cc. Tip: A favicon is a small image, so it should be a simple image with high contrast. A favicon image is displayed to the left of the page title in the browser tab, like this: To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is …
-
- 0 篇回复
- 21 次查看
-
-
HTML SVG Graphics SVG (Scalable Vector Graphics) SVG defines vector-based graphics in XML, which can be directly embedded in HTML pages. SVG graphics are scalable, and do not lose any quality if they are zoomed or resized: SVG is supported by all major browsers. What is SVG? SVG stands for Scalable Vector Graphics SVG is used to define vector-based graphics for the Web SVG defines graphics in XML format Each element and attribute in SVG files can be animated SVG is a W3C recommendation SVG integrates with other standards, such as CSS, DOM, XSL and JavaScript The <svg> Element The HTML <svg> element is a container for SVG graphics. …
-
- 0 篇回复
- 21 次查看
-
-
HTML Input Types This chapter describes the different types for the HTML <input> element. HTML Input Types Here are the different input types you can use in HTML: <input type="button"> <input type="checkbox"> <input type="color"> <input type="date"> <input type="datetime-local"> <input type="email"> <input type="file"> <input type="hidden"> <input type="image"> <input type="month"> <input type="number"> <input type="password"> <input type="radio"> <input type="range"> <input type="reset"> <input type="search"> <input type="subm…
-
- 0 篇回复
- 21 次查看
-
-
HTML Encoding (Character Sets) The HTML charset Attribute To display an HTML page correctly, a web browser must know which character set to use. The character set is specified in the <meta> tag: <meta charset="UTF-8"> The HTML specification encourages web developers to use the UTF-8 character set. UTF-8 covers almost all of the characters and symbols in the world! Learn More: Full UTF-8 Reference The ASCII Character Set ASCII was the first character encoding standard for the web. It defined 128 different latin characters that could be used on the internet: English letters (a-z and A-Z) Numbers (0-9) Some special characters: ! $ + - ( …
-
- 0 篇回复
- 21 次查看
-
-
HTML Paragraphs A paragraph always starts on a new line, and is usually a block of text. HTML Paragraphs The HTML <p> element defines a paragraph. A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph. Example <p>This is a paragraph.</p> <p>This is another paragraph.</p> HTML Display You cannot be sure how HTML will be displayed. Large or small screens, and resized windows will create different results. With HTML, you cannot change the display by adding extra spaces or extra lines in your HTML code. The browser will automatically remove any extra sp…
-
- 0 篇回复
- 21 次查看
-
-
HTML Code Challenges Test your HTML skills with code challenges from all categories: Code Challenges Loading challenges...
-
- 0 篇回复
- 20 次查看
-
-
HTML Input form* Attributes This chapter describes the different form* attributes for the HTML <input> element. The form Attribute The input form attribute specifies the form the <input> element belongs to. The value of this attribute must be equal to the id attribute of the <form> element it belongs to. Example An input field located outside of the HTML form (but still a part of the form): <form action="/action_page.php" id="form1"> <label for="fname">First name:</label> <input type="text" id="fname" name="fname"><br><br> <input type="submit" value="Submit"> </form> &l…
-
- 0 篇回复
- 20 次查看
-
-
HTML Styles The HTML style attribute is used to add styles to an element, such as color, font, size, and more. Example I am Red I am Blue I am Big The HTML Style Attribute Setting the style of an HTML element, can be done with the style attribute. The HTML style attribute has the following syntax: <tagname style="property:value;"> The property is a CSS property. The value is a CSS value. You will learn more about CSS later in this tutorial. Background Color The CSS background-color property defines the background color for an HTML element. Example Set the background color for a page to powderblue: <body style="background-colo…
-
- 0 篇回复
- 20 次查看
-
-
HTML Tutorial Learn HTML HTML is the standard markup language for Web pages. With HTML you can create your own Website. HTML is easy to learn - You will enjoy it! HTML Tutorial Study our HTML Tutorial for free, no registration needed. Learn HTML Now » OR HTML Course + Certificate Upgrade your learning with our interactive HTML Course and Get Certified. Upgrade to our HTML Course 🏁 Tip: Sign in to track your progress. Learning by Examples With our "Try it Yourself" editor, you can edit the HTML code and view the result in the browser:…
-
- 0 篇回复
- 19 次查看
-
-
HTML Text Formatting HTML contains several elements for defining text with a special meaning. Example This text is bold This text is italic This is subscript and superscript HTML Formatting Elements Formatting elements were designed to display special types of text: <b> - Bold text <strong> - Important text <i> - Italic text <em> - Emphasized text <mark> - Marked text <small> - Smaller text <del> - Deleted text <ins> - Inserted text <sub> - Subscript text <sup> - Superscript text HTML <b> and <strong> Elements The HTML <b> element defines bold text, without any e…
-
- 0 篇回复
- 19 次查看
-
-
HTML Quotation and Citation Elements In this chapter we will go through the <blockquote>,<q>, <abbr>, <address>, <cite>, and <bdo> HTML elements. Example Here is a quote from WWF's website: HTML <blockquote> for Quotations The HTML <blockquote> element defines a section that is quoted from another source. Browsers usually indent <blockquote> elements. Example <p>Here is a quote from WWF's website:</p> <blockquote cite="http://www.worldwildlife.org/who/index.html"> For 60 years, WWF has worked to help people and nature thrive. As the world's leading conservation organizati…
-
- 0 篇回复
- 19 次查看
-
-
HTML Symbols HTML Symbol Entities Symbols or letters that are not present on your keyboard can be added to HTML using entities. To add such symbols to an HTML page, you can use the entity name or the entity number (a decimal or a hexadecimal reference) for the symbol: Example Display the euro sign: <p>I will display €</p> <p>I will display €</p> <p>I will display €</p> Will display as: I will display € I will display € I will display € Some HTML Symbol Entities Char Number Entity Description © © © COPYRIGHT ® ® ® REGISTERED TRADEMARK …
-
- 0 篇回复
- 19 次查看
-
-
HTML Colors HTML colors are specified with predefined color names, or with RGB, HEX, HSL, RGBA, or HSLA values. Color Names In HTML, a color can be specified by using a color name: Tomato Orange DodgerBlue MediumSeaGreen Gray SlateBlue Violet LightGray Try it Yourself » HTML supports 140 standard color names. Background Color You can set the background color for HTML elements: Hello World Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis n…
-
- 0 篇回复
- 19 次查看
-
-
HTML Style Guide Consistent, clean, and tidy HTML code makes it easier for others to read and understand your code. Here are some guidelines and tips for creating good HTML code. Always Declare Document Type Always declare the document type as the first line in your document. The correct document type for HTML is: <!DOCTYPE html> Use Lowercase Element Names HTML allows mixing uppercase and lowercase letters in element names. However, we recommend using lowercase element names, because: Mixing uppercase and lowercase names looks bad Developers normally use lowercase names Lowercase looks cleaner Lowercase is easier to type Good: <body&…
-
- 0 篇回复
- 18 次查看
-
-
HTML Semantic Elements Semantic elements = elements with a meaning. What are Semantic Elements? A semantic element clearly describes its meaning to both the browser and the developer. Examples of non-semantic elements: <div> and <span> - Tells nothing about its content. Examples of semantic elements: <img>, <table>, and <article> - Clearly defines its content. Semantic Elements in HTML Many web sites contain HTML code like: <div id="nav"> <div class="header"> <div id="footer"> to indicate navigation, header, and footer. In HTML there are several semantic elements that can be used to define different parts of a we…
-
- 0 篇回复
- 17 次查看
-
-
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 次查看
-