« Home « Chủ đề thiết kế web với html và css

Chủ đề : thiết kế web với html và css


Có 40+ tài liệu thuộc chủ đề "thiết kế web với html và css"

Tự học HTML và CSS trong 1 giờ - part 21

tailieu.vn

ptg As you can see, the capability to link to external style sheets provides you with a power-. Any tag can serve as a CSS selector, and the rules associated with that selector will be applied to all instances of that tag on the page. You can add a rule to the <b>. tag that sets the font weight to...

Tự học HTML và CSS trong 1 giờ - part 22

tailieu.vn

ptg As you can see, the text in the inner <div>. That’s because I’ve set both the padding and margin of the inner <div>. there’s no need to specify a unit.) The results in Figure 8.5 show what happens if I change the style sheet to this:. FIGURE 8.5 The inner <div>. As you can see, I’ve created some space...

Tự học HTML và CSS trong 1 giờ - part 23

tailieu.vn

If using float to control how elements are laid out doesn’t provide the measure of con- trol you’re looking for, you can use the CSS positioning attributes. Elements flow down the page from left to right and top to bottom, unless you use the float property to change things up. The relative scheme positions the element relative to the element...

Tự học HTML và CSS trong 1 giờ - part 24

tailieu.vn

ptg Many layouts require that elements be flush with the edge of the browser. Some browsers enabled you to do this with proprietary attributes of the <body>. tag, but they’re not reliable. As you can see, there’s one more state here than has been traditionally reflected in the <body>. Using CSS, you can change the color of a link when...

Tự học HTML và CSS trong 1 giờ - part 25

tailieu.vn

Most browsers interpret the string you include in the alt attribute as a literal string. Here’s the web page for a local haunted house that’s open every year at Halloween.. Using all the excellent advice I’ve given you in the preceding eight lessons, you should be able to create a page like this one fairly easily. Here’s the HTML code...

Tự học HTML và CSS trong 1 giờ - part 26

tailieu.vn

</p>. Figure 9.9 shows the result in a browser.. FIGURE 9.9 Line break to a clear margin.. With the capability to wrap text around an image, you also might want to add some space between the image and the text that surrounds it. When you’re creating new pages, you should use CSS. vspace controls the space above and below the...

Tự học HTML và CSS trong 1 giờ - part 27

tailieu.vn

For elements with borders, you can also set the border color using the border-color property.. <p style=“color: #fff, background-color: #000”>This paragraph has white text on a black background.</p>. You can also use these properties to adjust the colors on the whole page by applying them to the body tag. <body style=“color: #fff. background-color: #00f”>. You can also specify colors as...

Tự học HTML và CSS trong 1 giờ - part 28

tailieu.vn

In addition, many of the latest WYSIWYG editors for HTML pages and Web graphics enable you to generate imagemaps. First, make a sketch of the regions that will be active on your image. Most image-editing programs have an option that displays the coordinates of the current mouse position. These values are based on their positions from the upper-left corner of...

Tự học HTML và CSS trong 1 giờ - part 29

tailieu.vn

border Defines the width of the border around an image (with or without a link). This workshop will help you remember some of the most important points about using images and color on your pages... Q What’s the difference between a GIF image and a JPEG image? Is there any rule of thumb that defines when you should use one...

Tự học HTML và CSS trong 1 giờ - part 30

tailieu.vn

Task: Exercise 10.1: Creating a Simple Table. Figure 10.4 shows the table you’re going to re-create in this example.. FIGURE 10.4 A simple color table.. Here’s a quick hint for laying out tables: Because HTML defines tables on a row-by-row basis, sometimes it can be difficult to keep track of the columns, particularly with com- plex tables. Then, when you...

Tự học HTML và CSS trong 1 giờ - part 31

tailieu.vn

ptg percentage of the full table width). specific pixel widths is a better idea because it allows your table to be displayed regard- less of the window size.. This time, however, the table spans 100% of the screen’s width. The first column is 40% of the table width, and the remaining three columns are 20% each.. <table border=“1” width=“100%”>. <th...

Tự học HTML và CSS trong 1 giờ - part 32

tailieu.vn

The optional align attribute of the <caption>. tag determines the alignment of the cap- tion. There are four values for the align attribute of the <caption>. By default, the caption is placed at the top of the table ( align=“top. You can use the align=“bottom” attribute to the caption if you want to put the caption at the bottom of...

Tự học HTML và CSS trong 1 giờ - part 33

tailieu.vn

<td>10mm</td>. <td>5-7mm</td>. <td rowspan=”2”>5-7mm</td>. <td style=”text-align: left”>Models with AC</td>. <td>12mm</td>. <td>6-8mm</td>. <td>12.5mm</td>. <td>7.9mm</td>. Under normal circumstances, avoid the use of the style attribute and instead use a style sheet for the page and apply classes where necessary to style your table. The <colgroup>...</colgroup>. You want each of the six columns to be 75 pixels wide. </colgroup>. <colgroup>. Start by defining...

Tự học HTML và CSS trong 1 giờ - part 34

tailieu.vn

Used to set alignment of all cells in a column. Used to set alignment of all cells in a column group. <table>. Determines the alignment of the table and indicates that text following the table will be wrapped alongside it.. Indicates which side of the table the caption will be placed. In Internet Explorer, the possible values are left ,...

Tự học HTML và CSS trong 1 giờ - part 35

tailieu.vn

<form action=”/form-processing-script” method=”post”>. <label for=”username”>Username</label>. <input type=”text” name=”username” />. <label for=”password”>Password</label>. <input type=”password” name=”password” />. <input type=”submit” class=”submit” value=”Log In” />. </form>. Let’s look at the style sheet for the form.. First, I added 5 pixels of margin to the bottom of the <div>. elements to space out the form elements a bit. Then, I used CSS to align the...

Tự học HTML và CSS trong 1 giờ - part 36

tailieu.vn

<label><input type=“checkbox” name=“symptoms” value=“nausea” />. Nausea</label>. <label><input type=“checkbox” name=“symptoms” value=“lightheadedness” />. Light-headedness</label>. <label><input type=“checkbox” name=“symptoms” value=“fever” />. Fever</label>. <label><input type=“checkbox” name=“symptoms” value=“headache” />. Headache</label>. When this form is submitted to a script for processing, each check box that’s checked returns a value associated with the name of the check box. When you asso- ciate a label with a check box...

Tự học HTML và CSS trong 1 giờ - part 37

tailieu.vn

enctype=“multipart/form-data”>. Here’s the name input:. <label class=”required field” for=”name”>Name</label>. <input name=”name” />. <label class=”required field”>Gender</label>. <label><input type=”radio” name=”gender” value=”male” />. male</label>. <label><input type=”radio” name=”gender” value=”female” />. female</label>. Here’s an instance where I used the <label>. As you can see, I used the approach of putting the <input>. tags inside the <label>. <label class=”required field”>Operating System</label>. <select name=”os”>. <option value=”windows”>Windows</option>. <option...

Tự học HTML và CSS trong 1 giờ - part 38

tailieu.vn

input[type=”text. One catch is that the attribute has to exist, so I had to add type=”text” to my <input>. However, I moved the required class to the enclosing div so that I can also use it in selectors that match the form fields themselves. The full source code for the page, including the form updated with classes, follows:. <style type=”text/css”...

Tự học HTML và CSS trong 1 giờ - part 39

tailieu.vn

First, however, it’s worth discussing the way the vast majority of videos are embedded in web pages these days. You can see the form that allows you to generate the embed code for YouTube in Figure 12.1.. FIGURE 12.1 The embed form on YouTube.. If you want to add a video hosted on YouTube, you just click the Embed button...

Tự học HTML và CSS trong 1 giờ - part 40

tailieu.vn

If it’s not, encode the video again using different settings. Afterward, watch the video and make sure that it still looks okay.. In the early days of the Web, to present video, the best approach was just to link to video files so that users could download them and play them in an application other than their browser. When browsers...