html標識について勉強中!回答。お願いします

このQ&Aのポイント
  • 初心者向けのhtml標識についての質問です。具体的に以下の項目について回答をお願いします。
  • 1. <?xml version="1.0" encoding="UTF-8"?>について 2. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />について 3. <!--メタヘッダー--> 4. <script>タグに関する質問
  • 質問内容は以下の通りです。 1. <?xml version="1.0" encoding="UTF-8"?>の意味と役割は何ですか? 2. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />の意味と役割は何ですか? 3. <!--メタヘッダー-->の意味と役割は何ですか? 4. <script>タグの意味と役割は何ですか? また、画像についても教えてください。
回答を見る
  • ベストアンサー

html標識について勉強中!回答。お願いします

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" id="tbod" lang="ja" xml:lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>黒ずみ解消!ケノン脱毛器でワキ脱毛した!≪感想&体験談≫</title> <meta name="description" content=" ≪このページでは、ケノンでワキ脱毛した赤裸々な脱毛経過写真を大公開中です!≫ ..." /> <meta name="keywords" content="2s,脱毛器ケノン体験中!本当の口コミ&効果" /> <!--メタヘッダー--> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <link rel="stylesheet" href="http://tsugaru-hirosaki.jp/styles-base.css" type="text/css" /> <link rel="alternate" type="application/atom+xml" title="Recent Entries" href="http://tsugaru-hirosaki.jp/atom.xml" /> <!--/メタヘッダー--> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-22049822-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> htmlについて初心者なのでいくつか質問させてください。(分かりやすく回答頂けると助かります) 1.<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" id="tbod" lang="ja" xml:lang="ja"> 2・<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 3・<!--メタヘッダー--> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <link rel="stylesheet" href="http://tsugaru-hirosaki.jp/styles-base.css" type="text/css" /> <link rel="alternate" type="application/atom+xml" title="Recent Entries" href="http://tsugaru-hirosaki.jp/atom.xml" /> <!--/メタヘッダー--> <script type="text/javascript"> 4・var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-22049822-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); それぞれどういう意味のhtml標識なのでしょうか? また、画像などもこのサイトあるのですが、その画像はどこかしらから取ってきているのか 自作で作ったのを使ってるのかとか分かりませんか? 勉強をしており、似たようなサイトを作っていきたいので、質問させていただきました。

質問者が選んだベストアンサー

  • ベストアンサー
  • DarkMoon
  • ベストアンサー率21% (225/1046)
回答No.1

1.   XMLは1.0に準拠しています。文字コードはUFT-8です。   あとに続くのはXHTMLに準拠しているという内容と、言語を日本語とする宣言です。 2.   このコンテンツはUFT-8で書かれたHTMLテキストと宣言しています。 3.   JavaScriptやスタイルシートに関する宣言だと思います。 4.   JavaScript記述の一部分だと思います。Googleから広告を取っているように見えますが   正確なことは分かりません。

関連するQ&A

  • サイトマップを自動作成できません。

    最近HPを作成した超初心者で、サイトマップの作成ができず 原因が皆目見当つかず行き詰ってしまいました。 サイトマップを自動生成してくれる「sitemap.xml Editor」を利用しているのですが index.html以外のページをサイトマップ化できません。 sitemap.xml Editor https://www.sitemapxml.jp/ ネット上で確認すると、index.htmlのリンクから他のページを表示することができます。 現在、ページ数はindex.htmlを含め20程です。 先頭のタグは全て共通で下の通りです。 基礎的な質問で恐縮ですが、解決のヒントなど教えていただけないdしょうか? よろしくお願いします。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="imagetoolbar" content="no" /> <meta name="description" content="説明文" /> <meta name="keywords" content="キーワード" /> <link rel="stylesheet" href="css/common.css" type="text/css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/common.js"></script> <title>タイトル</title> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-28512541-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head>

    • ベストアンサー
    • SEO
  • google翻訳ツール設置

    google翻訳ツールを ビルダー11で作成しているHPに設置したのですが プレビューで表示されません。 <header>から</header>の間に入れたのですが間違いでしょうか? 11行目です。 よろしくお願いいたします。非常に困っております。 ご存知の方教えてください、お願いします。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio … <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <title></title> <meta name="description" content="" /> <meta name="keywords" content="" /> <link href="style.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="table.css" id="_HPB_TABLE_CSS_ID_"> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-6834572-4']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <div id="container"> <div id="header"> <h1></h1> <a href="index.html"><img src="images/logo.gif" alt="Sample Nail Salon" name="logo" width="357" height="57" id="logo" /></a><br> </div> <!--/header-->

  • 下記のタグの中で必要ないのはありますか?

    (1) <?xml version="1.0" encoding="UTF-8"?> (2) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> (3) <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> (4) <head> (5) <title>●●●●●●●●</title> (6) <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> (7) <meta http-equiv="Content-Style-Type" content="text/css" /> (8) <meta name="robots" content="INDEX,FOLLOW"> (9) <meta name="description" content="●●●●●●●●"> (10) <meta name="keywords" content="●●●●●●●●"> (11) <meta name="content="●●●●●●●●" /> (12) <meta http-equiv="Content-Script-Type" content="text/javascript"> (13) <meta http-equiv="Content-Style-Type" content="text/css"> (14) <link href="css/A1.css" rel="stylesheet" type="text/css" /> (15) <META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">

  • cssがIE6で適用されない理由は

    教則本を見てcss/xhtmlでサイトを作ったのですが、 (教則本がIE7以降対応だった為) safari firefoxd IE7では表示がうまくいくのですが、 IE6では全くcssが適用されないです。 少し調べたところこの辺の記述に問題があるのかなと思っています。 誰か教えて下さい。 ............................................................................... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="jap" lang="jap" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Script-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> ....................................................................

    • ベストアンサー
    • HTML
  • Shift_JISのことろをすべてsjisに

    しても大丈夫でしょうか? たとえば以下のように書いて大丈夫でしょうか? 本来どのように書くべきでしょうか? <?xml version="1.0" encoding="sjis"?>のsjisと <meta http-equiv="content-type" content="application/xhtml+xml; charset=sjis"/> のsjisの2箇所です。 <?xml version="1.0" encoding="sjis"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset=sjis"/> <meta http-equiv="content-style-type" content="text/css"/> <meta http-equiv="content-script-type" content="text/javascript"/> <title>sjis</title> </head> <body> <p>これは文字化けのテストです</p> </body> </html>

    • ベストアンサー
    • HTML
  • headerの添削お願いします。

    自分なりに書いてみたのですがおかしいところがあったら教えてください。 また、採点してくれるサイトがあったと思うのですがご存知の方教えてください。 <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta http-equiv="content-style-type" content="text/css" /> <meta http-equiv="content-script-type" content="javascript" /> <meta name="keywords" content="content" /> <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" href="/css/main.css" type="text/css" /> <title>0725</title> </head>

  • CSSのアドバイスをお願いいたします。

    <?xml version="1.0" encoding="Shift_JIS"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> <head> <meta name="robots" content="noindex,nofollow,noarchive" /> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <style type="text/css"> .r { color : #407133; } .k { color : #336070; } .t { color : #454580; } .s { color : olive; } p { color : #222222; } body { background-color:#e0ffe0; } a:link { color : #0000ff; } a:visited { color : #003333; } a:hover { color : #660000; } a:active { color:#660066; </style> <meta http-equiv="Content-Script-Type" content="text/javascript" />の1行を加えてみました。 この場合の記述の是非。 また記述すべき個所は合っているのでしょうか。

    • ベストアンサー
    • HTML
  • XHTML meta属性 文字化け

    XHTMLを勉強しています。 以下のように記述して表示すると タイトルの部分が文字化けします。 何故でしょうか <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>ホームページの作り方</title> <meta name="description" content="初心者のためのホームページテスト" /> <meta name="keywords" content="ホームページ,作成,初心者" /> </head> <body> テスト </body> </html>

    • ベストアンサー
    • HTML
  • Xhtmlでの、class="imgover"の記述方法を教えてください。

    ただいま 独学ですが、Xhtmlを勉強しております。 Xhtmlで、カーソルが画像の上に来たら 画像が変わるように設定したいのですが、その方法が class="imgover" を使うと出来るとわかりやってみましたが・・・うまくできません。 下記にXhtmlを記述したので、教えてくださいお願いします。 <?xml version="1.0" encoding="Shift_JIS"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS" /> <meta http-equiv="content-style-type" content="text/css" /> <meta http-equiv="content-script-type" content="text/javascript" /> <meta http-equiv="imagetoolbar" content="no" /> <title>あれこれ</title> <meta name="description" content="あれこれ" /> <meta name="keywords" content="あれこれ" /> <meta name="copyright" content="あれこれ" /> <link rel="stylesheet" href="css/style.css" type="text/css" media="all" /> <script type="text/javascript" src="js/rollover.js"></script> </head> <body> <img src="img/header_logo.gif" width="312" height="39" alt="日本" class="imgover" /> </body> </html> 画像は、 header_logo.gifと header_logo_on.gif とが作ってあります。 どこかおかしいのでしょうか?

    • ベストアンサー
    • HTML
  • metaタグについて

    xhtml、strictで作っているのですが、metaで疑問に思ったので質問させていただきます。 CSSやJavascriptを外部ファイルにしていても <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/JavaScript" /> の記述は必要なんでしょうか?

    • ベストアンサー
    • HTML