Code icon

HTML - Basic tags

Links


    //BASIC TAGS
    <h1>My main title</h1>
    <p>This is a paragraph.</p>
    <div>Caja</div> //block
    <span>extra</span> //


    //ATTRIBUTES
    <p id="item1"></p> //Id -> Unique in the document
    <p class="line_basic"></p> //Class -> Can be used for other tags
    <script src="js/main.js"></script> //Src
    <link rel="stylesheet" href="styles.css">  // href


    //LINKS
    <a href="www.google.com" class="link_file">Link</a> //web
    <a href="#id1" class="link_file">Link</a> //to an id in the page
    <a href="mailto:someone@example.com">Send email</a> //OPEN EMAIL PROGRAM
    <a href="www.google.com" target="_">Link</a> //TARGET
    <a href="Javascript:void(0)" target="_">Link</a> //DO NOTHING WHEN CLICKING
    _self - Default. Opens the document in the same window/tab as it was clicked
    _blank - Opens the document in a new window or tab
    _parent - Opens the document in the parent frame
    _top - Opens the document in the full body of the window


    //IMAGES
    <img src="birds.png" alt="Code icon" class="menu_img">


    //FORMATTING
    <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