Programming Language/HTML | CSS | JS
HTML 7์ผ์ฐจ ๊ณต๋ถ
chaerlo127
2022. 1. 18. 21:27
728x90
728x90
- HTML Colors CSS <a> tag ์์ฌ ํด๋์ค
- a: link -> ๋งํฌ ์ฒซ ๋ฐฉ๋ฌธ ์ ์ํ
- a: visited - ๋งํฌ ๋ฐฉ๋ฌธ ํ ๋งํฌ ์ํ
- a: hover -> ๋ง์ฐ์ค ํด๋ฆญ ์
- a: active -> ๋ง์ฐ์ค ํด๋ฆญ ํ
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: beige;}
bdo {color: cornflowerblue;}
/* ๋ฐฉ๋ฌธ ์ & ๋ฐฉ๋ฌธ ํ */
a:link, a:visited
{
color: darkcyan;
background-color: gainsboro;
border: 2px solid tomato;
text-decoration: none;
text-align: center;
}
/* ๋ง์ฐ์ค ์ฌ๋ ค๋์ ๋ */
a:hover
{
color: slateblue;
background-color: grey;
text-decoration: underline;
}/* ๋ง์ฐ์ค ํด๋ฆญํ์ ๋*/
a:active
{
color:gold;
background-color: antiquewhite;
text-decoration: underline;
}
</style>
</head>
<body>
<a href="https://monynony0203.tistory.com/31?category=1044186" target="_blank">click</a>
</body>
</html>
- HTML Bookmarks
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<a href="#H1">open chapter 2</a>
<br>
<a href="#H2">open chapter 5</a>
<h2>Chapter 1</h2>
<p> this chapter is</p>
<h2 id="H1">Chapter 2</h2>
<p> this chapter is</p>
<h2>Chapter 3</h2>
<p> this chapter is</p>
<h2>Chapter 4</h2>
<p> this chapter is</p>
<h2 id="H2">Chapter 5</h2>
<p> this chapter is</p>
<h2>Chapter 6</h2>
<p> this chapter is</p>
<h2>Chapter 7</h2>
<p> this chapter is</p>
</body>
</html>
- HTML Image Height, Width
- Inline CSS
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<img src="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbz0Jbp%2FbtrqCa3BmJ7%2FANZB9PT5x0uF5cxzQA7o50%2Fimg.jpg"
style="width: 300px; height: 200px;">
<img src="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbz0Jbp%2FbtrqCa3BmJ7%2FANZB9PT5x0uF5cxzQA7o50%2Fimg.jpg"
width="300" height="200">
</body>
</html>
- Internal CSS
<!DOCTYPE html>
<html>
<head>
<style>
img
{
width: 300px;
height: 200px;
}
</style>
</head>
<body>
<img src="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbz0Jbp%2FbtrqCa3BmJ7%2FANZB9PT5x0uF5cxzQA7o50%2Fimg.jpg"
alt="you can't watch this picture">
</body>
</html>
- Image Floating
<!DOCTYPE html>
<html>
<head>
<style>
img
{
width: 300px;
height: 200px;
}
</style>
</head>
<body>
<p>
<img src="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbz0Jbp%2FbtrqCa3BmJ7%2FANZB9PT5x0uF5cxzQA7o50%2Fimg.jpg"
alt="you can't watch this picture" style="float:left"> ์ธ๋ฉด ์๋ผ
</p>
<br><br><br><br><br><br><br><br><br><br><br><br>
<p>
<img src="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbz0Jbp%2FbtrqCa3BmJ7%2FANZB9PT5x0uF5cxzQA7o50%2Fimg.jpg"
alt="you can't watch this picture" style="float:right"> ์ธ๋ฉด ์๋ผ
</p>
</body>
</html>
728x90